using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using CoreFS.CA06; using Common; using System.Collections; using Core.LZMes.Client.UIE; namespace Core.LZMes.Client.UIF { /// /// 酸轧生产管制主界面:轧批指定 /// public partial class UIF0420101 : CoreFS.CA06.FrmBase { public UIF0420101() { InitializeComponent(); } #region "Button Event" /// /// 轧制单元计划:酸轧基料卷选择 /// /// /// private void btn_Add_Click(object sender, EventArgs e) { try { this.ugrd_HCoilInfo.UpdateData(); System.Data.DataRow[] rows = this.dataSet1.Tables["TAB_HCOILINFO"].Select("FLAG='TRUE'"); if (rows.Length == 0) { MessageBox.Show("您还未选择基料卷,请选择"); return; } string CoilNOS = ""; string ex = ""; for (int i = 0; i < this.ugrd_HCoilInfo.Rows.Count; i++) { if (Common.FixDBManager.CheckNullStr(ugrd_HCoilInfo.Rows[i].Cells["FLAG"].Value).ToUpper() == "TRUE") { CoilNOS = CoilNOS + ugrd_HCoilInfo.Rows[i].Cells["COIL_NO"].Value.ToString() + ";"; } } CoilNOS = CoilNOS.Substring(0, CoilNOS.Length - 1); Hashtable paramHsmp = new Hashtable(); paramHsmp.Add("i1", CoilNOS); paramHsmp.Add("i2", rows.Length.ToString()); paramHsmp.Add("i3", CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName()); paramHsmp.Add("o4", ex); CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "UIB.COM.ComDBProcedure"; ccp.MethodName = "doXmlProcedure"; ccp.ServerParams = new Object[] { "UIF042010.Add_RollPlan_List", paramHsmp }; CoreClientParam obj = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal); System.Collections.ArrayList err = obj.ReturnObject as System.Collections.ArrayList; if (err != null && err.Count > 0 && Common.FixDBManager.CheckNullStr(err[0]) != "1") { MessageBox.Show(err[0].ToString(), Common.FixDBManager.MsgCaption); } else { Get_RollPlan_List(); Get_RollPlan_Info(); for (int i = rows.Length - 1; i >= 0; i--) { this.dataSet1.Tables["TAB_HCOILINFO"].Rows.Remove(rows[i]); } this.dataSet1.Tables["TAB_HCOILINFO"].AcceptChanges(); } } catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } /// /// 轧制单元计划:删除已制定的计划 /// /// /// private void btn_Del_Click(object sender, EventArgs e) { try { if (this.ugrd_RollPlan.Selected.Rows.Count == 0) { MessageBox.Show("请选择您要移除的记录"); return; } string RollNO = this.ugrd_RollInfo.Rows[0].Cells[1].Value.ToString(); string CoilNOS = ""; string Condition = ""; foreach (Infragistics.Win.UltraWinGrid.UltraGridRow row in this.ugrd_RollPlan.Selected.Rows) { CoilNOS = CoilNOS + Common.FixDBManager.CheckNullStr(row.Cells["COIL_NO"].Value) + ";"; Condition = Condition + "'" + Common.FixDBManager.CheckNullStr(row.Cells["COIL_NO"].Value) + "',"; } CoilNOS = CoilNOS.Substring(0, CoilNOS.Length - 1); Condition = Condition.Substring(0, Condition.Length - 1); Condition = " AND A.COIL_NO IN(" + Condition + ") "; Hashtable paramHsmp = new Hashtable(); paramHsmp.Add("i1", RollNO); paramHsmp.Add("i2", CoilNOS); paramHsmp.Add("i3", this.ugrd_RollPlan.Selected.Rows.Count.ToString()); CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "UIB.COM.ComDBProcedure"; ccp.MethodName = "doXmlProcedure"; ccp.ServerParams = new Object[] { "UIF042010.Del_RollPlan_List", paramHsmp }; CoreClientParam obj = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal); System.Collections.ArrayList err = obj.ReturnObject as System.Collections.ArrayList; if (err != null && err.Count > 0 && Common.FixDBManager.CheckNullStr(err[0]) != "1") { MessageBox.Show(err[0].ToString(), Common.FixDBManager.MsgCaption); } else { Get_RollPlan_List(); Get_RollPlan_Info(); Query(Condition); } } catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } /// /// 轧制单位内基料卷顺序前移 /// /// /// private void btn_UP_Click(object sender, EventArgs e) { try { if (this.ugrd_RollPlan.Selected.Rows.Count == 0) { MessageBox.Show("请确定您要前移的基料卷"); return; } string ex = ""; string Index_ = ""; string RollNO = this.ugrd_RollInfo.Rows[0].Cells[1].Value.ToString(); System.Collections.ArrayList HCoil_ary = new ArrayList(); foreach (Infragistics.Win.UltraWinGrid.UltraGridRow row in this.ugrd_RollPlan.Selected.Rows) { Index_ = Index_ + Common.FixDBManager.CheckNullStr(row.Cells["INDX_"].Value) + ";"; HCoil_ary.Add(row.Cells["COIL_NO"].Value); } Index_ = Index_.Substring(0, Index_.Length - 1); string[] Indexs_ = Index_.Split(';'); if (Check_Index_Order(Indexs_)) { Hashtable paramHsmp = new Hashtable(); paramHsmp.Add("i1", RollNO); paramHsmp.Add("i2", this.ugrd_RollPlan.Selected.Rows.Count.ToString()); paramHsmp.Add("i3", Get_Index_Min(Indexs_)); paramHsmp.Add("i4", Get_Index_Max(Indexs_)); paramHsmp.Add("i5", "-1"); paramHsmp.Add("o6", ex); CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "UIB.COM.ComDBProcedure"; ccp.MethodName = "doXmlProcedure"; ccp.ServerParams = new Object[] { "UIF042010.Adj_RollPlan_List", paramHsmp }; CoreClientParam obj = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal); System.Collections.ArrayList err = obj.ReturnObject as System.Collections.ArrayList; if (err != null && err.Count > 0 && Common.FixDBManager.CheckNullStr(err[0]) != "1") { MessageBox.Show(err[0].ToString(), Common.FixDBManager.MsgCaption); } else { Get_RollPlan_List(); Get_RollPlan_Info(); ReSet_SelectRow(HCoil_ary); } } } catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } /// /// 轧制单元内基料卷顺序后移 /// /// /// private void btn_Down_Click(object sender, EventArgs e) { try { if (this.ugrd_RollPlan.Selected.Rows.Count == 0) { MessageBox.Show("请确定您要前移的基料卷"); return; } string ex = ""; string Index_ = ""; string RollNO = this.ugrd_RollInfo.Rows[0].Cells[1].Value.ToString(); System.Collections.ArrayList HCoil_ary = new ArrayList(); foreach (Infragistics.Win.UltraWinGrid.UltraGridRow row in this.ugrd_RollPlan.Selected.Rows) { Index_ = Index_ + Common.FixDBManager.CheckNullStr(row.Cells["INDX_"].Value) + ";"; HCoil_ary.Add(row.Cells["COIL_NO"].Value); } Index_ = Index_.Substring(0, Index_.Length - 1); string[] Indexs_ = Index_.Split(';'); if (Check_Index_Order(Indexs_)) { Hashtable paramHsmp = new Hashtable(); paramHsmp.Add("i1", RollNO); paramHsmp.Add("i2", this.ugrd_RollPlan.Selected.Rows.Count.ToString()); paramHsmp.Add("i3", Get_Index_Min(Indexs_)); paramHsmp.Add("i4", Get_Index_Max(Indexs_)); paramHsmp.Add("i5", "1"); paramHsmp.Add("o6", ex); CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "UIB.COM.ComDBProcedure"; ccp.MethodName = "doXmlProcedure"; ccp.ServerParams = new Object[] { "UIF042010.Adj_RollPlan_List", paramHsmp }; CoreClientParam obj = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal); System.Collections.ArrayList err = obj.ReturnObject as System.Collections.ArrayList; if (err != null && err.Count > 0 && Common.FixDBManager.CheckNullStr(err[0]) != "1") { MessageBox.Show(err[0].ToString(), Common.FixDBManager.MsgCaption); } else { Get_RollPlan_List(); Get_RollPlan_Info(); ReSet_SelectRow(HCoil_ary); } } } catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } /// /// 并卷 /// /// /// private void btn_Merge_Click(object sender, EventArgs e) { try { if (this.ugrd_RollPlan.Selected.Rows.Count == 0) { MessageBox.Show("请确定您要并卷的基料卷"); return; } string Index_ = ""; string HCoilNOS = ""; string ex = ""; string RollNO = this.ugrd_RollInfo.Rows[0].Cells[1].Value.ToString(); System.Collections.ArrayList HCoil_ary = new ArrayList(); foreach (Infragistics.Win.UltraWinGrid.UltraGridRow row in this.ugrd_RollPlan.Selected.Rows) { Index_ = Index_ + Common.FixDBManager.CheckNullStr(row.Cells["INDX_"].Value) + ";"; HCoilNOS = HCoilNOS + Common.FixDBManager.CheckNullStr(row.Cells["COIL_NO"].Value) + ";"; HCoil_ary.Add(row.Cells["COIL_NO"].Value); } Index_ = Index_.Substring(0, Index_.Length - 1); string[] Indexs_ = Index_.Split(';'); if (Check_Index_Order(Indexs_)) { Hashtable paramHsmp = new Hashtable(); paramHsmp.Add("i1", RollNO); paramHsmp.Add("i2", this.ugrd_RollPlan.Selected.Rows.Count.ToString()); paramHsmp.Add("i3", HCoilNOS); paramHsmp.Add("o4", ex); CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "UIB.COM.ComDBProcedure"; ccp.MethodName = "doXmlProcedure"; ccp.ServerParams = new Object[] { "UIF042010.Mge_RollPlan_HCoil", paramHsmp }; CoreClientParam obj = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal); System.Collections.ArrayList err = obj.ReturnObject as System.Collections.ArrayList; if (err != null && err.Count > 0 && Common.FixDBManager.CheckNullStr(err[0]) != "1") { MessageBox.Show(err[0].ToString(), Common.FixDBManager.MsgCaption); } else { Get_RollPlan_List(); Get_RollPlan_Info(); ReSet_SelectRow(HCoil_ary); } } } catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } /// /// 取消并卷 /// /// /// private void btn_Cancel_Click(object sender, EventArgs e) { try { if (this.ugrd_RollPlan.Selected.Rows.Count == 0) { MessageBox.Show("请确定您要并卷的基料卷"); return; } string Index_ = ""; string HCoilNOS = ""; string RollNO = this.ugrd_RollInfo.Rows[0].Cells[1].Value.ToString(); System.Collections.ArrayList HCoil_ary = new ArrayList(); foreach (Infragistics.Win.UltraWinGrid.UltraGridRow row in this.ugrd_RollPlan.Selected.Rows) { Index_ = Index_ + Common.FixDBManager.CheckNullStr(row.Cells["INDX_"].Value) + ";"; HCoilNOS = HCoilNOS + Common.FixDBManager.CheckNullStr(row.Cells["COIL_NO"].Value) + ";"; HCoil_ary.Add(row.Cells["COIL_NO"].Value); } Index_ = Index_.Substring(0, Index_.Length - 1); string[] Indexs_ = Index_.Split(';'); string ex = ""; if (Check_Index_Order(Indexs_)) { Hashtable paramHsmp = new Hashtable(); paramHsmp.Add("i1", RollNO); paramHsmp.Add("i2", this.ugrd_RollPlan.Selected.Rows.Count.ToString()); paramHsmp.Add("i3", HCoilNOS); paramHsmp.Add("o4", ex); CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "UIB.COM.ComDBProcedure"; ccp.MethodName = "doXmlProcedure"; ccp.ServerParams = new Object[] { "UIF042010.CMg_RollPlan_HCoil", paramHsmp }; CoreClientParam obj = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal); System.Collections.ArrayList err = obj.ReturnObject as System.Collections.ArrayList; if (err != null && err.Count > 0 && Common.FixDBManager.CheckNullStr(err[0]) != "1") { MessageBox.Show(err[0].ToString(), Common.FixDBManager.MsgCaption); } else { Get_RollPlan_List(); Get_RollPlan_Info(); ReSet_SelectRow(HCoil_ary); } } } catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } private bool Check_Index_Order(string[] Index_) { try { if (Index_.Length < 2) return true; int value = 0; for (int i = 0; i < Index_.Length - 1; i++) { value = Common.FixDBManager.CheckNullInt(Index_[i + 1]) - Common.FixDBManager.CheckNullInt(Index_[i]); if (value > 1) { MessageBox.Show("所操作的基料卷的顺序不能跳跃"); return false; } } return true; } catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); return false; } } private string Get_Index_Min(string[] Index_) { string Index_Min = Index_[0]; for (int i = 1; i < Index_.Length; i++) { if (Common.FixDBManager.CheckNullInt(Index_Min) > Common.FixDBManager.CheckNullInt(Index_[i])) { Index_Min = Index_[i]; } } return Index_Min; } private string Get_Index_Max(string[] Index_) { string Index_Max = Index_[0]; for (int i = 1; i < Index_.Length; i++) { if (Common.FixDBManager.CheckNullInt(Index_Max) < Common.FixDBManager.CheckNullInt(Index_[i])) { Index_Max = Index_[i]; } } return Index_Max; } private void ReSet_SelectRow(System.Collections.ArrayList HCoil_ary) { try { foreach (Infragistics.Win.UltraWinGrid.UltraGridRow row in this.ugrd_RollPlan.Rows) { if (HCoil_ary.Contains(row.Cells["COIL_NO"].Value)) { row.Selected = true; } } } catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } #endregion #region "ToolBar Event" public override void ToolBar_Click(object sender, string ToolbarKey) { try { switch (ToolbarKey) { case "Query": string Condition = this.uiF042010_CTL1.Condition; Condition = Condition + " AND A.TOT_DEC_GRD IS NOT NULL "; this.dataSet1.Tables["TAB_HCOILINFO"].Clear(); Query(Condition); break; case "Save": string RollNO = this.ugrd_RollInfo.Rows[0].Cells[1].Value.ToString(); Save(RollNO); break; case "Exit": this.Close(); break; } } catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } /// /// 根据条件得到待选取的冷轧基料卷信息 /// private void Query(string Condition) { try { CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "UIF.UIF04.UIF042010"; ccp.MethodName = "Query_HCoil_Info"; ccp.ServerParams = new object[] { Condition }; CoreClientParam obj = this.ExecuteQuery(ccp, CoreInvokeType.Internal); if (obj.ReturnInfo.Length == 0) { System.Data.DataTable tab0 = FixDBManager.ConvertToDataTable(obj.ReturnObject as System.Collections.ArrayList, this.dataSet1.Tables["TAB_HCOILINFO"]); tab0.TableName = "TAB_HCOILINFO"; this.dataSet1.Tables["TAB_HCOILINFO"].Merge(tab0); this.dataSet1.AcceptChanges(); } } catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } private void Save(string RollNO) { try { string chk_flag = ""; if (this.CHK_CHEM.Checked) chk_flag = "1"; else chk_flag = "0"; if (this.CHK_PHY.Checked) chk_flag = chk_flag + "1"; else chk_flag = chk_flag + "0"; chk_flag=chk_flag + "000"; string ex = ""; string chk_ex = ""; Hashtable paramHsmp = new Hashtable(); paramHsmp.Add("i1", RollNO); paramHsmp.Add("i2", CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName()); paramHsmp.Add("i3", chk_flag); paramHsmp.Add("o4", chk_ex); paramHsmp.Add("o5", ex); CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "UIB.COM.ComDBProcedure"; ccp.MethodName = "doXmlProcedure"; ccp.ServerParams = new Object[] { "UIF042010.AFM_RollPlan", paramHsmp }; CoreClientParam obj = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal); System.Collections.ArrayList err = obj.ReturnObject as System.Collections.ArrayList; if (err != null && err.Count > 0 && Common.FixDBManager.CheckNullStr(err[0]) != "1") { MessageBox.Show(err[0].ToString(), Common.FixDBManager.MsgCaption); if (err.Count > 1 && Common.FixDBManager.CheckNullStr(err[1]) != "1") { string[] err_Coil = Common.FixDBManager.CheckNullStr(err[1]).Split('#'); SetDataErrorRow(err_Coil); } } else { Get_RollPlan_List(); Get_RollPlan_Info(); } } catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } private void SetDataErrorRow(string[] err_Coil) { try { System.Collections.Hashtable err_hsb = new Hashtable(); foreach (string Coil in err_Coil) { if (Coil.Length > 2) { string err_no = Coil.Split(':')[0]; string Coil_no = Coil.Split(':')[1]; System.Collections.ArrayList err_list; if (err_hsb.Contains(Coil_no)) { err_list = err_hsb[Coil_no] as System.Collections.ArrayList; err_list.Add(err_no); err_hsb[Coil_no] = err_list; } else { err_list = new ArrayList(); err_list.Add(err_no); err_hsb.Add(Coil_no, err_list); } } } foreach (System.Data.DataRow row in this.dataSet1.Tables["TAB_ROLLPLAN"].Rows) { if (err_hsb.Contains(row["COIL_NO"].ToString())) { string err_Info = ""; System.Collections.ArrayList err_lst = err_hsb[row["COIL_NO"].ToString()] as System.Collections.ArrayList; for (int i = 0; i < err_lst.Count; i++) { switch (err_lst[i].ToString()) { case "10000": err_Info = err_Info + "基料卷成分不满足要求,不能确认计划" + "\n"; break; case "01000": err_Info = err_Info + "基料卷性能不满足要求,不能确认计划" + "\n"; break; } } row.SetColumnError(this.dataSet1.Tables["TAB_ROLLPLAN"].Columns["INDX_"], err_Info); } } } catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } #endregion #region"Init" /// /// 窗体初始化事件 /// 用于加载初始化数据 /// /// /// private void UIF0420101_Load(object sender, EventArgs e) { try { System.Windows.Forms.ToolTip tip = new ToolTip(); tip.SetToolTip(this.btn_UP, "上移"); tip.SetToolTip(this.btn_Down, "下移"); tip.SetToolTip(this.btn_Merge, "合并基料卷"); tip.SetToolTip(this.btn_Cancel, "取消基料卷合并"); Get_RollPlan_List(); Get_RollPlan_Info(); Common.FixDBManager.SetGridCheckBox("FLAG", "TAB_HCOILINFO", 25, this.ugrd_HCoilInfo); string ColumnName = ""; for (int i = 0; i < this.ugrd_HCoilInfo.DisplayLayout.Bands[0].Columns.Count; i++) { ColumnName = this.ugrd_HCoilInfo.DisplayLayout.Bands[0].Columns[i].Key; if (ColumnName == "FLAG") { Common.FixDBManager.SetCellActivation(ColumnName, "TAB_HCOILINFO", this.ugrd_HCoilInfo, "ALLOWEDIT"); } else { Common.FixDBManager.SetCellActivation(ColumnName, "TAB_HCOILINFO", this.ugrd_HCoilInfo, "ACTIVATEONLY"); } } this.ugrd_RollPlan.DisplayLayout.Override.SupportDataErrorInfo = Infragistics.Win.UltraWinGrid.SupportDataErrorInfo.RowsAndCells; } catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } /// /// 获取已制定未确认的轧制计划信息 /// private void Get_RollPlan_List() { try { CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "UIF.UIF04.UIF042010"; ccp.MethodName = "Query_RollPlan_List"; CoreClientParam obj = this.ExecuteQuery(ccp, CoreInvokeType.Internal); if (obj.ReturnInfo.Length == 0) { this.dataSet1.Tables["TAB_ROLLPLAN"].Clear(); System.Data.DataTable tab0 = FixDBManager.ConvertToDataTable(obj.ReturnObject as System.Collections.ArrayList, this.dataSet1.Tables["TAB_ROLLPLAN"]); tab0.TableName = "TAB_ROLLPLAN"; this.dataSet1.Tables["TAB_ROLLPLAN"].Merge(tab0); this.dataSet1.AcceptChanges(); } } catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } /// /// 获取已制定未确认的轧制计划描述信息 /// private void Get_RollPlan_Info() { try { CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "UIF.UIF04.UIF042010"; ccp.MethodName = "Query_RollPlan_Info"; CoreClientParam obj = this.ExecuteQuery(ccp, CoreInvokeType.Internal); if (obj.ReturnInfo.Length == 0) { this.dataSet1.Tables["TAB_ROLLINFO"].Clear(); System.Data.DataTable tab0 = FixDBManager.ConvertToDataTable(obj.ReturnObject as System.Collections.ArrayList, this.dataSet1.Tables["TAB_ROLLINFO"]); tab0.TableName = "TAB_ROLLINFO"; this.dataSet1.Tables["TAB_ROLLINFO"].Merge(tab0); this.dataSet1.AcceptChanges(); } } catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } #endregion #region "Grid Event" private void ugrd_HCoilInfo_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { try { this.ugrd_HCoilInfo.UpdateData(); if (e.Cell.Column.Key == "FLAG") { if (e.Cell.Value.ToString().ToUpper() == "TRUE") { e.Cell.Row.Appearance.BackColor = System.Drawing.Color.LightSteelBlue; } else { e.Cell.Row.Appearance.BackColor = System.Drawing.Color.White; } } } catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } private void ugrd_HCoilInfo_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e) { try { if (this.ugrd_HCoilInfo.ActiveRow != null) { Core.LZMes.Client.UIB.UIB010301 frm = new Core.LZMes.Client.UIB.UIB010301(); frm.ob = this.ob; frm.OrderNO = Common.FixDBManager.CheckNullStr(this.ugrd_HCoilInfo.ActiveRow.Cells["ORD_NO"].Value); frm.OrderSEQ = Common.FixDBManager.CheckNullStr(this.ugrd_HCoilInfo.ActiveRow.Cells["ORD_SEQ"].Value); ; frm.ShowDialog(); } } catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } private void ugrd_HCoilInfo_ClickCell(object sender, Infragistics.Win.UltraWinGrid.ClickCellEventArgs e) { //try //{ // if (e.Cell.Column.Key == "ORD_NO" | e.Cell.Column.Key == "ORD_SEQ") // { // Core.LZMes.Client.UIB.UIB010301 frm = new Core.LZMes.Client.UIB.UIB010301(); // frm.ob = this.ob; // frm.OrderNO = Common.FixDBManager.CheckNullStr(this.ugrd_HCoilInfo.ActiveRow.Cells["ORD_NO"].Value); // frm.OrderSEQ = Common.FixDBManager.CheckNullStr(this.ugrd_HCoilInfo.ActiveRow.Cells["ORD_SEQ"].Value); ; // frm.ShowDialog(); // } //} //catch (System.Exception ex) //{ // System.Diagnostics.Debug.WriteLine(ex.ToString()); //} } #endregion private void ugrd_HCoilInfo_AfterCellActivate(object sender, EventArgs e) { Infragistics.Win.UltraWinGrid.UltraGrid tt = (Infragistics.Win.UltraWinGrid.UltraGrid)sender; string clickColumnID = Convert.ToString(Common.FixDBManager.CheckNullStr(tt.ActiveCell.Column.Key)); if (!(clickColumnID.Equals("ORD_NO") || clickColumnID.Equals("ORD_SEQ") || clickColumnID.Equals("CUST_CD"))) { return; } string clickNO = Convert.ToString(Common.FixDBManager.CheckNullStr(tt.ActiveRow.Cells["ORD_NO"].Value)); string clickSeq = Convert.ToString(Common.FixDBManager.CheckNullStr(tt.ActiveRow.Cells["ORD_SEQ"].Value)); if (clickNO == null || clickNO == "") return; if (clickSeq == null || clickSeq == "") return; if (clickColumnID.Equals("ORD_NO")) { Core.LZMes.Client.UIE.UIE041050 frm = new UIE041050(); frm.ob = this.ob; frm.Condition = clickNO + "|" + clickSeq; frm.ShowDialog(); } else if (clickColumnID.Equals("ORD_SEQ")) { Core.LZMes.Client.UIE.UIE041080 frm = new UIE041080(); frm.ob = this.ob; frm.Condition = clickNO + "|" + clickSeq; frm.ShowDialog(); } else if (clickColumnID.Equals("CUST_CD")) { try { if (this.ugrd_HCoilInfo.ActiveRow != null) { Core.LZMes.Client.UIB.UIB010301 frm = new Core.LZMes.Client.UIB.UIB010301(); frm.ob = this.ob; frm.OrderNO = Common.FixDBManager.CheckNullStr(this.ugrd_HCoilInfo.ActiveRow.Cells["ORD_NO"].Value); frm.OrderSEQ = Common.FixDBManager.CheckNullStr(this.ugrd_HCoilInfo.ActiveRow.Cells["ORD_SEQ"].Value); ; frm.ShowDialog(); } } catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } else { return; } } } }