private void gridView1_CustomRowCellEditForEditing(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { DataRowView CurrRow = this.bindingSource1.Current as DataRowView; if (CurrRow == null) { return; } popControlLB.PopupControl.Size = new Size(e.Column.Width, popControlLB.PopupControl.Height); switch (e.Column.FieldName) { case "LB": this.JGGJMCbindingSource.Filter = "JGSYID='4'"; popControlLB.DataSource = this.JGGJMCbindingSource; popControlLB.ColName = new string[] { "类别|JGGJMC|LB" }; popControlLB.RemoveDefaultColName = new string[] { "BHD" }; popControlLB.bind(); break; case "BHD": this.JMCCbindingSource.Filter = "JGSYID='4'"; DataTable dtTemp = new DataTable(); if (toString(CurrRow["LB"]) == "栏板" || toString(CurrRow["LB"]) == "女儿墙") { foreach (DataRowView item in JMCCbindingSource) { if (ToolKit.ParseInt(item["JMCC"]) <= 100) { this.strToTable(dtTemp, toString(item["JMCC"]), "JMCC", ">100mm"); } } } else { foreach (DataRowView item in JMCCbindingSource) { this.strToTable(dtTemp, toString(item["JMCC"]), "JMCC", ','); } } popControlLB.DataSource = dtTemp; popControlLB.ColName = new string[] { "板厚度(mm)|JMCC|BHD" }; popControlLB.bind(); break; case "BBG": popControlLB.DataSource = this.CGSDbindingSource; popControlLB.ColName = new string[] { "板标高(m)|CGSD|BBG" }; popControlLB.bind(); break; case "HNTBHLYQ": popControlLB.DataSource = this.HNTYQbindingSource; popControlLB.ColName = new string[] { "混凝土拌合料要求|BHLYQ|HNTBHLYQ" }; popControlLB.RemoveDefaultColName = new string[] { "HNTQDDJ" }; popControlLB.bind(); break; case "HNTQDDJ": DataRowView currRow = this.bindingSource1.Current as DataRowView; if (null == currRow) { return; } LookUpEditSelectChage(CDataConvert.ConToValue <string>(currRow["HNTBHLYQ"]).Trim()); popControlLB.DataSource = this.HNTQDbindingSource; popControlLB.ColName = new string[] { "混凝土强度等级|QDDJ|HNTQDDJ" }; popControlLB.bind(); break; } }
private void gridView1_CustomRowCellEditForEditing(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { txtMaTinhThanh.Text = gridView1.GetRowCellValue(e.RowHandle, "TinhThanhId").ToString(); txtTenTinhThanh.Text = gridView1.GetRowCellValue(e.RowHandle, "tenTinhThanh").ToString(); }
private void gridView1_CustomRowCellEditForEditing(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { PhieuThuPhiPhongId = (int)gridView1.GetRowCellValue(e.RowHandle, "PhieuThuTienPhongId"); }
private void gridView1_CustomRowCellEditForEditing(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { DataRowView currRow = this.bindingSource1.Current as DataRowView; StringBuilder strString = null; if (null == currRow) { return; } popControl1.PopupControl.Size = new Size(e.Column.Width, popControl1.PopupControl.Height); switch (e.Column.FieldName) { case "FL": this.DQQDDEBindingSource.Filter = " LB = '防雷接地' and FL is not null"; popControl1.DataSource = RemoveRepeat(strToTable(DQQDDEBindingSource, "FL", ','), "FL"); popControl1.ColName = new string[] { "分类|FL|FL" }; //清除依赖项数据 popControl1.RemoveDefaultColName = new string[] { "JDJB", "JDMX", "JDKJX", "BLZW", "BLYXX", "BLW", "DDWLJ", "YQFF" }; popControl1.bind(); break; case "JDJB": strString = new StringBuilder(" LB = '防雷接地' and LX ='接地极(板)'"); strString.Append(string.IsNullOrEmpty(toString(currRow["FL"])) ? " and FL is null" : string.Format(" and FL like '%,{0},%'", currRow["FL"])) .Append(" and GGXH is not null"); this.DQQDDEBindingSource.Filter = strString.ToString(); popControl1.DataSource = RemoveRepeat(strToTable(DQQDDEBindingSource, "GGXH", ','), "GGXH"); popControl1.ColName = new string[] { "接地极(板)|GGXH|JDJB" }; popControl1.bind(); break; case "JDMX": strString = new StringBuilder(" LB = '防雷接地' and LX ='接地母线'"); strString.Append(string.IsNullOrEmpty(toString(currRow["FL"])) ? " and FL is null" : string.Format(" and FL like '%,{0},%'", currRow["FL"])) .Append(" and GGXH is not null"); this.DQQDDEBindingSource.Filter = strString.ToString(); popControl1.DataSource = RemoveRepeat(strToTable(DQQDDEBindingSource, "GGXH", ','), "GGXH"); popControl1.ColName = new string[] { "接地母线|GGXH|JDMX" }; popControl1.bind(); break; case "JDKJX": strString = new StringBuilder(" LB = '防雷接地' and LX ='接地跨接线'"); strString.Append(string.IsNullOrEmpty(toString(currRow["FL"])) ? " and FL is null" : string.Format(" and FL like '%,{0},%'", currRow["FL"])) .Append(" and GGXH is not null"); this.DQQDDEBindingSource.Filter = strString.ToString(); popControl1.DataSource = RemoveRepeat(strToTable(DQQDDEBindingSource, "GGXH", ','), "GGXH"); popControl1.ColName = new string[] { "接地跨接线|GGXH|JDKJX" }; popControl1.bind(); break; case "BLZW": strString = new StringBuilder(" LB = '防雷接地' and LX ='避雷针(网)'"); strString.Append(string.IsNullOrEmpty(toString(currRow["FL"])) ? " and FL is null" : string.Format(" and FL like '%,{0},%'", currRow["FL"])) .Append(" and GGXH is not null"); this.DQQDDEBindingSource.Filter = strString.ToString(); popControl1.DataSource = RemoveRepeat(strToTable(DQQDDEBindingSource, "GGXH", ','), "GGXH"); popControl1.ColName = new string[] { "避雷针(网)|GGXH|BLZW" }; popControl1.bind(); break; case "BLYXX": strString = new StringBuilder(" LB = '防雷接地' and LX ='避雷引下线'"); strString.Append(string.IsNullOrEmpty(toString(currRow["FL"])) ? " and FL is null" : string.Format(" and FL like '%,{0},%'", currRow["FL"])) .Append(" and GGXH is not null"); this.DQQDDEBindingSource.Filter = strString.ToString(); popControl1.DataSource = RemoveRepeat(strToTable(DQQDDEBindingSource, "GGXH", ','), "GGXH"); popControl1.ColName = new string[] { "避雷引下线|GGXH|BLYXX" }; popControl1.bind(); break; case "BLW": strString = new StringBuilder(" LB = '防雷接地' and LX ='避雷网'"); strString.Append(string.IsNullOrEmpty(toString(currRow["FL"])) ? " and FL is null" : string.Format(" and FL like '%,{0},%'", currRow["FL"])) .Append(" and GGXH is not null"); this.DQQDDEBindingSource.Filter = strString.ToString(); popControl1.DataSource = RemoveRepeat(strToTable(DQQDDEBindingSource, "GGXH", ','), "GGXH"); popControl1.ColName = new string[] { "避雷网|GGXH|BLW" }; popControl1.bind(); break; case "DDWLJ": strString = new StringBuilder(" LB = '防雷接地' and LX ='等电位联结'"); strString.Append(string.IsNullOrEmpty(toString(currRow["FL"])) ? " and FL is null" : string.Format(" and FL like '%,{0},%'", currRow["FL"])) .Append(" and GGXH is not null"); this.DQQDDEBindingSource.Filter = strString.ToString(); popControl1.DataSource = RemoveRepeat(strToTable(DQQDDEBindingSource, "GGXH", ','), "GGXH"); popControl1.ColName = new string[] { "等电位联结|GGXH|DDWLJ" }; popControl1.bind(); break; case "YQFF": strString = new StringBuilder(" LB = '防雷接地' and LX ='油漆(防腐)'"); strString.Append(string.IsNullOrEmpty(toString(currRow["FL"])) ? " and FL is null" : string.Format(" and FL like '%,{0},%'", currRow["FL"])) .Append(" and GGXH is not null"); this.DQQDDEBindingSource.Filter = strString.ToString(); popControl1.DataSource = RemoveRepeat(strToTable(DQQDDEBindingSource, "GGXH", ','), "GGXH"); popControl1.ColName = new string[] { "油漆(防腐)|GGXH|YQFF" }; popControl1.bind(); break; } }
private void gvDetails_CustomRowCellEdit(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { DrawValueMembers(e); }
private void bandedGridView1_CustomRowCellEdit(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { if (e.RowHandle < 0) { return; } //走势预判 if (e.Column.Name == this.colTrend.Name) { ImageComboBoxEdit icb = new ImageComboBoxEdit(); icb.Properties.Items.AddRange(this.riImageComboBoxTrendType.Items); e.RepositoryItem = icb.Properties; foreach (ImageComboBoxItem item in icb.Properties.Items) { if (e.CellValue != null && e.CellValue.ToString() == item.Value.ToString()) { icb.SelectedItem = item; return; } } } //操作方案 else if (e.Column.Name == this.colScheme.Name) { ImageComboBoxEdit icb = new ImageComboBoxEdit(); icb.Properties.Items.AddRange(this.riImageComboBoxOperateScheme.Items); e.RepositoryItem = icb.Properties; foreach (ImageComboBoxItem item in icb.Properties.Items) { if (e.CellValue != null && e.CellValue.ToString() == item.Value.ToString()) { icb.SelectedItem = item; return; } } } //交易类别 else if (e.Column.Name == this.colTradeType.Name) { ImageComboBoxEdit icb = new ImageComboBoxEdit(); icb.Properties.Items.AddRange(this.riImageComboBoxTradeType.Items); e.RepositoryItem = icb.Properties; foreach (ImageComboBoxItem item in icb.Properties.Items) { if (e.CellValue != null && e.CellValue.ToString() == item.Value.ToString()) { icb.SelectedItem = item; return; } } } //操作方式 else if (e.Column.Name == this.colOperateMode.Name) { ImageComboBoxEdit icb = new ImageComboBoxEdit(); icb.Properties.Items.AddRange(this.riImageComboBoxOperateMode.Items); e.RepositoryItem = icb.Properties; foreach (ImageComboBoxItem item in icb.Properties.Items) { if (e.CellValue != null && e.CellValue.ToString() == item.Value.ToString()) { icb.SelectedItem = item; return; } } } }
private void gridView1_CustomRowCellEdit(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { var a = e.Column; }
private void GvEmployee_CustomRowCellEditForEditing(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { throw new System.NotImplementedException(); }
private void gridView1_CustomRowCellEditForEditing(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { string ma = gridView1.GetRowCellValue(e.RowHandle, "MaSoTour").ToString(); loadDgvDiaDiemTheoMa(int.Parse(ma)); }
private void gridView1_CustomRowCellEdit(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { gridView1.Columns["edit"].ClearFilter(); }
private void gridView1_CustomRowCellEditForEditing(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { DataRowView CurrRow = this.bindingSource1.Current as DataRowView; if (CurrRow == null) { return; } popControl1.PopupControl.Size = new Size(e.Column.Width, popControl1.PopupControl.Height); switch (e.Column.FieldName) { case "LB": this.JGGJMCbindingSource.Filter = "JGSYID='2'"; popControl1.DataSource = this.JGGJMCbindingSource; popControl1.ColName = new string[] { "类别|JGGJMC|LB" }; popControl1.RemoveDefaultColName = new string[] { "JMXZ" }; popControl1.bind(); break; case "JMXZ": this.MBZMbindingSource.Filter = "JGMC='梁' and JGGJMC is null or JGGJMC like '%," + CurrRow["LB"] + ",%'"; DataTable dtItem = new DataTable(); foreach (DataRowView item in MBZMbindingSource) { this.strToTable(dtItem, toString(item["JMXZMC"]), "JMXZMC"); } popControl1.DataSource = this.RemoveRepeat(dtItem, "JMXZMC"); popControl1.ColName = new string[] { "截面形状|JMXZMC|JMXZ" }; popControl1.bind(); break; case "LK": this.JMCCbindingSource.Filter = "JGSYID='2'"; popControl1.DataSource = this.JMCCbindingSource; popControl1.ColName = new string[] { "梁宽(mm)|JMCC|LK" }; popControl1.bind(); break; case "LG": this.JMCCbindingSource.Filter = "JGSYID='2'"; popControl1.DataSource = this.JMCCbindingSource; popControl1.ColName = new string[] { "梁高(mm)|JMCC|LG" }; popControl1.bind(); break; case "LDBG": popControl1.DataSource = this.CGSDbindingSource; popControl1.ColName = new string[] { "梁底标高|CGSD|LDBG" }; popControl1.bind(); break; case "HNTBHLYQ": popControl1.DataSource = this.HNTYQbindingSource; popControl1.ColName = new string[] { "混凝土拌合料要求|BHLYQ|HNTBHLYQ" }; popControl1.RemoveDefaultColName = new string[] { "HNTQDDJ" }; popControl1.bind(); break; case "HNTQDDJ": DataRowView currRow = this.bindingSource1.Current as DataRowView; if (null == currRow) { return; } LookUpEditSelectChage(CDataConvert.ConToValue <string>(currRow["HNTBHLYQ"]).Trim()); popControl1.DataSource = this.HNTQDbindingSource; popControl1.ColName = new string[] { "混凝土强度等级|QDDJ|HNTQDDJ" }; popControl1.bind(); break; } }
private void gridView1_CustomRowCellEditForEditing(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { DataRowView currRow = this.bindingSource1.Current as DataRowView; if (null == currRow) { return; } popControl1.PopupControl.Size = new Size(e.Column.Width, popControl1.PopupControl.Height); DataTable dt = QDDEBindingSource.DataSource as DataTable; switch (e.Column.FieldName) { case "MCCLPZ": popControl1.DataSource = this.QDDEBindingSource; QDDEBindingSource.Filter = ""; //去重复 popControl1.DataSource = this.RemoveRepeat(dt, "MCPZ"); popControl1.ColName = new string[] { "面层材料品种|MCPZ|MCCLPZ" }; //清除依赖项数据 popControl1.RemoveDefaultColName = new string[] { "KLMCGG", "QTCL", "YWJC", "GNTFS", "TJCHDCLZL" }; popControl1.bind(); break; case "KLMCGG": popControl1.DataSource = this.QDDEBindingSource; this.QDDEBindingSource.Filter = string.Format(" MCPZ = '{0}' and KLGG is not null ", toString(currRow["MCCLPZ"])); //去重复 popControl1.DataSource = this.RemoveRepeat(dt, "KLGG"); popControl1.ColName = new string[] { "块料面层规格|KLGG|KLMCGG" }; //清除依赖项数据 popControl1.RemoveDefaultColName = new string[] { "QTCL", "YWJC", "GNTFS", "TJCHDCLZL" }; popControl1.bind(); break; case "QTCL": popControl1.DataSource = this.QDDEBindingSource; this.QDDEBindingSource.Filter = string.Format(" MCPZ = '{0}' and (KLGG is null or KLGG ='{1}' ) and QTCL is not null" , toString(currRow["MCCLPZ"]), toString(currRow["KLMCGG"])); //去重复 popControl1.DataSource = this.RemoveRepeat(dt, "QTCL"); popControl1.ColName = new string[] { "墙体材料|QTCL|QTCL" }; //清除依赖项数据 popControl1.RemoveDefaultColName = new string[] { "YWJC", "GNTFS", "TJCHDCLZL" }; popControl1.bind(); break; case "YWJC": popControl1.DataSource = this.QDDEBindingSource; this.QDDEBindingSource.Filter = string.Format(" MCPZ = '{0}' and (KLGG is null or KLGG ='{1}' ) and QTCL='{2}' and JC is not null" , toString(currRow["MCCLPZ"]), toString(currRow["KLMCGG"]), toString(currRow["QTCL"])); //去重复 popControl1.DataSource = this.RemoveRepeat(dt, "JC"); popControl1.ColName = new string[] { "基层|JC|YWJC" }; //清除依赖项数据 popControl1.RemoveDefaultColName = new string[] { "GNTFS", "TJCHDCLZL" }; popControl1.bind(); break; case "GNTFS": popControl1.DataSource = this.QDDEBindingSource; this.QDDEBindingSource.Filter = string.Format(" MCPZ = '{0}' and (KLGG is null or KLGG ='{1}' ) and QTCL='{2}' and JC ='{3}' and FS is not null" , toString(currRow["MCCLPZ"]), toString(currRow["KLMCGG"]), toString(currRow["QTCL"]), toString(currRow["YWJC"])); //去重复 popControl1.DataSource = this.RemoveRepeat(dt, "FS"); popControl1.ColName = new string[] { "挂、粘贴方式|FS|GNTFS" }; //清除依赖项数据 popControl1.RemoveDefaultColName = new string[] { "TJCHDCLZL" }; popControl1.bind(); break; case "TJCHDCLZL": popControl1.DataSource = this.QDDEBindingSource; this.QDDEBindingSource.Filter = string.Format(" MCPZ = '{0}' and (KLGG is null or KLGG ='{1}' ) and QTCL='{2}' and JC ='{3}' and (FS is null or FS='{4}') and CLZL is not null" , toString(currRow["MCCLPZ"]), toString(currRow["KLMCGG"]), toString(currRow["QTCL"]), toString(currRow["YWJC"]), toString(currRow["GNTFS"])); //去重复 popControl1.DataSource = this.RemoveRepeat(dt, "CLZL"); popControl1.ColName = new string[] { "贴结层厚度、材料种类|CLZL|TJCHDCLZL" }; popControl1.bind(); break; } }
private void gridView1_CustomRowCellEditForEditing(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { DataRowView CurrRow = this.bindingSource1.Current as DataRowView; if (CurrRow == null) { return; } popControl1.PopupControl.Size = new Size(e.Column.Width, popControl1.PopupControl.Height); popControl1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; switch (e.Column.FieldName) { case "LB": this.JGGJMCbindingSource.Filter = "JGSYID='3'"; popControl1.DataSource = this.JGGJMCbindingSource; popControl1.ColName = new string[] { "类别|JGGJMC|LB" }; popControl1.bind(); break; case "ZXHX": this.QDbindingSource.Filter = "JGFL='墙' and (JGLBMC is null or JGLBMC like '%," + CurrRow["LB"] + ",%')"; DataTable dtItem = new DataTable(); foreach (DataRowView item in QDbindingSource) { this.strToTable(dtItem, toString(item["JMXZ"]), "JMXZ"); } popControl1.DataSource = this.RemoveRepeat(dtItem, "JMXZ"); popControl1.ColName = new string[] { "直行、弧形|JMXZ|ZXHX" }; popControl1.bind(); break; case "QHD": popControl1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; this.JMCCbindingSource.Filter = "JGSYID='3'"; popControl1.DataSource = this.JMCCbindingSource; popControl1.ColName = new string[] { "墙厚度(mm)|JMCC|QHD" }; popControl1.bind(); break; case "QGD": popControl1.DataSource = this.CGSDbindingSource; popControl1.ColName = new string[] { "墙高度(m)|CGSD|QGD" }; popControl1.bind(); break; case "HNTBHLYQ": popControl1.DataSource = this.HNTYQbindingSource; popControl1.ColName = new string[] { "混凝土拌合料要求|BHLYQ|HNTBHLYQ" }; popControl1.RemoveDefaultColName = new string[] { "HNTQDDJ" }; popControl1.bind(); break; case "HNTQDDJ": DataRowView currRow = this.bindingSource1.Current as DataRowView; if (null == currRow) { return; } LookUpEditSelectChage(CDataConvert.ConToValue <string>(currRow["HNTBHLYQ"]).Trim()); popControl1.DataSource = this.HNTQDbindingSource; popControl1.ColName = new string[] { "混凝土强度等级|QDDJ|HNTQDDJ" }; popControl1.bind(); break; } }
private void gridView3_CustomRowCellEditForEditing(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { cboPhuongTien.EditValue = null; cboPhuongTien.Properties.NullText = gridView3.GetRowCellValue(e.RowHandle, "TenPhuongTien").ToString(); }
private void gridView1_CustomRowCellEditForEditing(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { DataRowView currRow = this.bindingSource1.Current as DataRowView; StringBuilder strString = null; if (null == currRow) { return; } popControl1.PopupControl.Size = new Size(e.Column.Width, popControl1.PopupControl.Height); switch (e.Column.FieldName) { case "DLFL": this.DQQDDEBindingSource.Filter = " LB = '电缆敷设' and FL is not null"; popControl1.DataSource = RemoveRepeat(strToTable(DQQDDEBindingSource, "FL", ','), "FL"); popControl1.ColName = new string[] { "电缆分类|FL|DLFL" }; //清除依赖项数据 popControl1.RemoveDefaultColName = new string[] { "GGXH", "JGGB", "DLZDTGGXH", "DLZJTGGXH", "DLBHG", "FHZR", "DLFH" }; popControl1.bind(); break; case "GGXH": strString = new StringBuilder(" LB = '电缆敷设'"); strString.Append(string.IsNullOrEmpty(toString(currRow["DLFL"])) ? " and FL is null" : string.Format(" and FL like '%,{0},%'", currRow["DLFL"])) .Append(" and GGXH is not null"); this.DQQDDEBindingSource.Filter = strString.ToString(); popControl1.DataSource = RemoveRepeat(strToTable(DQQDDEBindingSource, "GGXH", ','), "GGXH"); popControl1.ColName = new string[] { "规格型号|GGXH|GGXH" }; popControl1.bind(); break; case "JGGB": strString = new StringBuilder(" LB = '揭(盖)盖板' "); strString.Append(string.IsNullOrEmpty(toString(currRow["DLFL"])) ? " and FL is null" : string.Format(" and FL like '%,{0},%'", currRow["DLFL"])) .Append(" and GGXH is not null"); this.DQQDDEBindingSource.Filter = strString.ToString(); popControl1.DataSource = RemoveRepeat(strToTable(DQQDDEBindingSource, "GGXH", ','), "GGXH"); popControl1.ColName = new string[] { "揭(盖)盖板|GGXH|JGGB" }; popControl1.bind(); break; case "DLZDTGGXH": strString = new StringBuilder(" LB = '电缆终端头' "); strString.Append(string.IsNullOrEmpty(toString(currRow["DLFL"])) ? " and FL is null" : string.Format(" and FL like '%,{0},%'", currRow["DLFL"])) .Append(" and GGXH is not null"); this.DQQDDEBindingSource.Filter = strString.ToString(); popControl1.DataSource = RemoveRepeat(strToTable(DQQDDEBindingSource, "GGXH", ','), "GGXH"); popControl1.ColName = new string[] { "电缆终端头规格型号|GGXH|DLZDTGGXH" }; popControl1.bind(); break; case "DLZJTGGXH": strString = new StringBuilder(" LB = '电缆中间头' "); strString.Append(string.IsNullOrEmpty(toString(currRow["DLFL"])) ? " and FL is null" : string.Format(" and FL like '%,{0},%'", currRow["DLFL"])) .Append(" and GGXH is not null"); this.DQQDDEBindingSource.Filter = strString.ToString(); popControl1.DataSource = RemoveRepeat(strToTable(DQQDDEBindingSource, "GGXH", ','), "GGXH"); popControl1.ColName = new string[] { "电缆中间头规格型号|GGXH|DLZJTGGXH" }; popControl1.bind(); break; case "DLBHG": strString = new StringBuilder(" LB = '电缆保护管' "); strString.Append(string.IsNullOrEmpty(toString(currRow["DLFL"])) ? " and FL is null" : string.Format(" and FL like '%,{0},%'", currRow["DLFL"])) .Append(" and GGXH is not null"); this.DQQDDEBindingSource.Filter = strString.ToString(); popControl1.DataSource = RemoveRepeat(strToTable(DQQDDEBindingSource, "GGXH", ','), "GGXH"); popControl1.ColName = new string[] { "电缆保护管|GGXH|DLBHG" }; popControl1.bind(); break; case "FHZR": strString = new StringBuilder(" LB = '防火阻燃' "); strString.Append(string.IsNullOrEmpty(toString(currRow["DLFL"])) ? " and FL is null" : string.Format(" and FL like '%,{0},%'", currRow["DLFL"])) .Append(" and GGXH is not null"); this.DQQDDEBindingSource.Filter = strString.ToString(); popControl1.DataSource = RemoveRepeat(strToTable(DQQDDEBindingSource, "GGXH", ','), "GGXH"); popControl1.ColName = new string[] { "防火阻燃|GGXH|FHZR" }; popControl1.bind(); break; case "DLFH": strString = new StringBuilder(" LB = '电缆防护' "); strString.Append(string.IsNullOrEmpty(toString(currRow["DLFL"])) ? " and FL is null" : string.Format(" and FL like '%,{0},%'", currRow["DLFL"])) .Append(" and GGXH is not null"); this.DQQDDEBindingSource.Filter = strString.ToString(); popControl1.DataSource = RemoveRepeat(strToTable(DQQDDEBindingSource, "GGXH", ','), "GGXH"); popControl1.ColName = new string[] { "电缆防护|GGXH|DLFH" }; popControl1.bind(); break; } }
private void gvMasterList_CustomRowCellEdit(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { try { //if (e.Column.Caption == "Edit") //{ // bool val = Convert.ToBoolean(gvMasterList.GetRowCellValue(e.RowHandle, "IsUsed")); // if (val) // { // DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit ritem = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); // ritem.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; // ritem.ReadOnly = false; // ritem.Buttons[0].Enabled = false; // ritem.Buttons[0].Visible = false; // e.RepositoryItem = ritem; // } //} TypeName if (e.Column.Caption == "Delete") { int nSystemDefined = Convert.ToString(gvMasterList.GetRowCellValue(e.RowHandle, "SystemDefined")) == "" || Convert.ToString(gvMasterList.GetRowCellValue(e.RowHandle, "SystemDefined")) == "0" ? 0 : 1; if (nSystemDefined == 0) { int nVal = Convert.ToString(gvMasterList.GetRowCellValue(e.RowHandle, "IsUsed")) == "" || Convert.ToString(gvMasterList.GetRowCellValue(e.RowHandle, "IsUsed")) == "0" ? 0 : 1; string sVal = Convert.ToString(gvMasterList.GetRowCellValue(e.RowHandle, "TypeName")); bool val = Convert.ToBoolean(nVal); if (val) { DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit ritem = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); ritem.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; ritem.ReadOnly = false; ritem.Buttons[0].Enabled = false; ritem.Buttons[0].Visible = false; e.RepositoryItem = ritem; } if (sVal == "Warehouse Superintendent") { DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit ritem = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); ritem.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; ritem.ReadOnly = false; ritem.Buttons[0].Enabled = false; ritem.Buttons[0].Visible = false; e.RepositoryItem = ritem; } } else { DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit ritem = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); ritem.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; ritem.ReadOnly = false; ritem.Buttons[0].Enabled = false; ritem.Buttons[0].Visible = false; e.RepositoryItem = ritem; } } if (e.Column.Caption == "Edit") { int nSystemDefined = Convert.ToString(gvMasterList.GetRowCellValue(e.RowHandle, "SystemDefined")) == "" || Convert.ToString(gvMasterList.GetRowCellValue(e.RowHandle, "SystemDefined")) == "0" ? 0 : 1; if (nSystemDefined == 0) { string sVal = Convert.ToString(gvMasterList.GetRowCellValue(e.RowHandle, "TypeName")); if (sVal == "Warehouse Superintendent") { DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit ritem = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); ritem.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; ritem.ReadOnly = false; ritem.Buttons[0].Enabled = false; ritem.Buttons[0].Visible = false; e.RepositoryItem = ritem; } } else { DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit ritem = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); ritem.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; ritem.ReadOnly = false; ritem.Buttons[0].Enabled = false; ritem.Buttons[0].Visible = false; e.RepositoryItem = ritem; } } } catch (Exception ex) { MessageBox.Show("Error: " + ex.ToString(), clsGlobal._sMessageboxCaption, MessageBoxButtons.OK, MessageBoxIcon.Information); } //var row=gvMasterList.GetRowCellValue(e.RowHandle,gvMasterList.Columns[3]); //if (row == "Cloth") //{ // DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit ri = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); //} }
private void gridView1_CustomRowCellEditForEditing(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { txtMaDichVu.Text = gridView1.GetRowCellValue(e.RowHandle, "MaDichVu").ToString().Trim(); txtTenDichVu.Text = gridView1.GetRowCellValue(e.RowHandle, "TenDichVu").ToString().Trim(); TrangThaiNhanView(); }
private void advBandedGridViewPublication_CustomRowCellEditForEditing(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { if (e.Column == gridColumnDiscounts || e.Column == gridColumnColorPricingPercent) { if (e.RowHandle == 0) { e.RepositoryItem = repositoryItemSpinEditDiscountsEditFirstRow; } else { e.RepositoryItem = repositoryItemSpinEditDiscountsEdit; } } if (e.Column == gridColumnColorPricing) { if (e.RowHandle == 0) { e.RepositoryItem = repositoryItemSpinEditColorPricingEditFirstRow; } else { e.RepositoryItem = repositoryItemSpinEditColorPricingEdit; } } if (e.Column == gridColumnADRate && this.Publication.AdPricingStrategy == BusinessClasses.AdPricingStrategies.FlatModular) { if (string.IsNullOrEmpty(this.Publication.Inserts[advBandedGridViewPublication.GetDataSourceRowIndex(e.RowHandle)].Comment) && string.IsNullOrEmpty(this.Publication.Inserts[advBandedGridViewPublication.GetDataSourceRowIndex(e.RowHandle)].Section) && string.IsNullOrEmpty(this.Publication.Inserts[advBandedGridViewPublication.GetDataSourceRowIndex(e.RowHandle)].Deadline)) { e.RepositoryItem = repositoryItemSpinEditADRateEditNull; } else { e.RepositoryItem = repositoryItemSpinEditADRateEdit; } } }
private void gridView1_CustomRowCellEditForEditing(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { DataRowView currRow = this.bindingSource1.Current as DataRowView; if (null == currRow) { return; } popControl1.PopupControl.Size = new Size(e.Column.Width, popControl1.PopupControl.Height); StringBuilder strString = null; switch (e.Column.FieldName) { case "FL": strString = new StringBuilder(" LB='管件' and FL is not null"); GYGDQDDEBindingSource.Filter = strString.ToString(); popControl1.DataSource = RemoveRepeat(strToTable(GYGDQDDEBindingSource, "FL", ','), "FL"); popControl1.ColName = new string[] { "分类|FL|FL" }; popControl1.RemoveDefaultColName = new string[] { "CZ", "LJFS", "GJ", "BWHD" }; popControl1.bind(); break; case "CZ": strString = new StringBuilder(" LB='管件' and CZ is not null"); strString.Append(string.IsNullOrEmpty(toString(currRow["FL"])) ? " and FL is null" : string.Format(" and FL = '{0}'", currRow["FL"])); GYGDQDDEBindingSource.Filter = strString.ToString(); popControl1.DataSource = RemoveRepeat(strToTable(GYGDQDDEBindingSource, "CZ", ','), "CZ"); popControl1.ColName = new string[] { "材质|CZ|CZ" }; popControl1.RemoveDefaultColName = new string[] { "LJFS", "GJ", "BWHD" }; popControl1.bind(); break; case "LJFS": strString = new StringBuilder(" LB='管件' and LJFS is not null"); strString.Append(string.IsNullOrEmpty(toString(currRow["FL"])) ? " and FL is null" : string.Format(" and FL = '{0}'", currRow["FL"])) .Append(string.IsNullOrEmpty(toString(currRow["CZ"])) ? " and CZ is null" : string.Format(" and CZ = '{0}'", currRow["CZ"])); GYGDQDDEBindingSource.Filter = strString.ToString(); popControl1.DataSource = RemoveRepeat(strToTable(GYGDQDDEBindingSource, "LJFS", ','), "LJFS"); popControl1.ColName = new string[] { "连接方式|LJFS|LJFS" }; popControl1.RemoveDefaultColName = new string[] { "GJ", "BWHD" }; popControl1.bind(); break; case "GJ": strString = new StringBuilder(" LB='管件' and GJ is not null"); strString.Append(string.IsNullOrEmpty(toString(currRow["FL"])) ? " and FL is null" : string.Format(" and FL = '{0}'", currRow["FL"])) .Append(string.IsNullOrEmpty(toString(currRow["CZ"])) ? " and CZ is null" : string.Format(" and CZ = '{0}'", currRow["CZ"])) .Append(string.IsNullOrEmpty(toString(currRow["LJFS"])) ? " and LJFS is null" : string.Format(" and LJFS like '%,{0},%'", currRow["LJFS"])); GYGDQDDEBindingSource.Filter = strString.ToString(); popControl1.DataSource = RemoveRepeat(strToTable(GYGDQDDEBindingSource, "GJ", ','), "GJ"); popControl1.ColName = new string[] { "管径(mm)|GJ|GJ" }; popControl1.RemoveDefaultColName = new string[] { "BWHD" }; popControl1.bind(); break; case "CX": this.FFSYCXBindingSource.Filter = string.Format("FL ='除锈工程' and BW ='设备' and LX is not null"); popControl1.DataSource = RemoveRepeat(FFSYCXBindingSource, "LX"); popControl1.ColName = new string[] { "除锈|LX|CX" }; popControl1.bind(); break; case "BWQFFSYYQ": this.FFSYCXBindingSource.Filter = string.Format("FL ='防腐刷油工程' and (BW ='设备刷油' or BW ='设备防腐') and LX is not null"); popControl1.DataSource = RemoveRepeat(FFSYCXBindingSource, "LX"); popControl1.ColName = new string[] { "保温前防腐刷油要求|LX|BWQFFSYYQ" }; popControl1.bind(); break; case "BWJRCLZL": this.BWJRGCBindingSource.Filter = string.Format("FL ='保温绝热工程' and BWLB ='保温层' and BWFL='一般设备' and JRCL is not null"); popControl1.DataSource = RemoveRepeat(strToTable(BWJRGCBindingSource, "JRCL", ','), "JRCL"); popControl1.ColName = new string[] { "保温绝热材料种类|JRCL|BWJRCLZL" }; popControl1.bind(); break; case "BWHD": //获取计算直径 即设备直径 this.GCZJZHBindingSource.Filter = string.Format("YSGG = '{0}'", currRow["GJ"]); DataRowView sjzj = GCZJZHBindingSource.Current as DataRowView; decimal sbzj = sjzj == null ? -1 : ToolKit.ParseDecimal(sjzj["JSZJ"]); strString = new StringBuilder("FL='保温绝热工程' and BWLB ='保温层' and BWFL ='管道' and JRHD is not null"); strString.Append(sbzj == -1 ? " and MaxSBZJ is null" : string.Format(" and MaxSBZJ>={0}", sbzj)) .Append(sbzj == -1 ? " and MinSBZJ is null" : string.Format(" and MinSBZJ<={0}", sbzj)); this.BWJRGCBindingSource.Filter = strString.ToString(); //获取保温厚度范围 decimal minValue = 0; decimal maxValue = 0; int i = 0; foreach (DataRowView item in BWJRGCBindingSource) { if (item != null && item["JRHD"] != null) { string[] jrhd = toString(item["JRHD"]).Split('~'); if (jrhd.Length == 2) { if (i == 0) { minValue = decimal.Parse(jrhd[0]); maxValue = decimal.Parse(jrhd[1]); i++; } if (decimal.Parse(jrhd[0]) <= minValue) { minValue = decimal.Parse(jrhd[0]); } if (decimal.Parse(jrhd[1]) >= maxValue) { maxValue = decimal.Parse(jrhd[1]); } } } } repositoryItemSpinEdit1.MaxValue = maxValue; repositoryItemSpinEdit1.MinValue = minValue; break; case "FCCBHCCL": this.BWJRGCBindingSource.Filter = string.Format("FL ='保温绝热工程' and BWLB ='防潮层、保护层' and BWFL='一般设备' and JRCL is not null"); popControl1.DataSource = RemoveRepeat(strToTable(BWJRGCBindingSource, "JRCL", ','), "JRCL"); popControl1.ColName = new string[] { "防潮层保护层材料|JRCL|FCCBHCCL" }; popControl1.bind(); break; case "BWHFFSYYQ": this.FFSYCXBindingSource.Filter = string.Format("FL ='防腐刷油工程' and (BW ='设备刷油' or BW ='设备防腐') and LX is not null"); popControl1.DataSource = RemoveRepeat(FFSYCXBindingSource, "LX"); popControl1.ColName = new string[] { "保温后防腐刷油要求|LX|BWHFFSYYQ" }; popControl1.bind(); break; } }
private void gridView1_CustomRowCellEditForEditing(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { DataRowView currRow = this.bindingSource1.Current as DataRowView; if (null == currRow) { return; } popControl1.PopupControl.Size = new Size(e.Column.Width, popControl1.PopupControl.Height); StringBuilder strString = null; switch (e.Column.FieldName) { case "AZBW": string str_azbw = "室内,室外"; popControl1.DataSource = strToTable(str_azbw, "AZBW", ','); popControl1.ColName = new string[] { "安装部位|AZBW|AZBW" }; //popControl1.RemoveDefaultColName = new string[] { "CZ", "LJFS", "GJ", "BWHD" }; popControl1.bind(); break; case "CZLX": this.GDAZBindingSource.Filter = " XT='水灭火' and CZLX is not null"; //字符串截断并去重复 popControl1.DataSource = RemoveRepeat(strToTable(this.GDAZBindingSource, "CZLX", ','), "CZLX"); popControl1.ColName = new string[] { "材质类型|CZLX|CZLX" }; popControl1.RemoveDefaultColName = new string[] { "LJFS", "GGXH", "BWHD" }; popControl1.bind(); break; case "LJFS": strString = new StringBuilder(" XT='水灭火' and LJFS is not null"); strString.Append(string.IsNullOrEmpty(toString(currRow["CZLX"])) ? " and CZLX is null" : string.Format(" and CZLX like '%,{0},%'", currRow["CZLX"])); GDAZBindingSource.Filter = strString.ToString(); popControl1.DataSource = RemoveRepeat(GDAZBindingSource, "LJFS"); popControl1.ColName = new string[] { "连接方式|LJFS|LJFS" }; popControl1.RemoveDefaultColName = new string[] { "GGXH", "BWHD" }; popControl1.bind(); break; case "GGXH": strString = new StringBuilder(" XT='水灭火' and LJFS is not null"); strString.Append(string.IsNullOrEmpty(toString(currRow["CZLX"])) ? " and CZLX is null" : string.Format(" and CZLX like '%,{0},%'", currRow["CZLX"])) .Append(string.IsNullOrEmpty(toString(currRow["LJFS"])) ? " and LJFS is null" : string.Format(" and LJFS = '{0}'", currRow["LJFS"])); this.GDAZBindingSource.Filter = strString.ToString(); popControl1.DataSource = RemoveRepeat(GDAZBindingSource, "GGXH"); popControl1.ColName = new string[] { "规格、型号|GGXH|GGXH" }; popControl1.RemoveDefaultColName = new string[] { "BWHD" }; popControl1.bind(); break; case "CZBW": this.GDSZBindingSource.Filter = string.Format("SYFW ='消防' and BTMS ='操作部位'"); popControl1.DataSource = RemoveRepeat(this.GDSZBindingSource, "GD"); popControl1.ColName = new string[] { "操作部位|GD|CZBW" }; popControl1.bind(); break; case "CZGD": this.GDSZBindingSource.Filter = string.Format("SYFW ='消防' and BTMS ='操作高度'"); popControl1.DataSource = RemoveRepeat(GDSZBindingSource, "GD"); popControl1.ColName = new string[] { "操作高度|GD|CZGD" }; popControl1.bind(); break; case "BWQFFSYYQ": this.FFSYCXBindingSource.Filter = string.Format("FL ='防腐刷油工程' and (BW ='管道刷油' or BW ='管道防腐') and LX is not null"); popControl1.DataSource = RemoveRepeat(FFSYCXBindingSource, "LX"); popControl1.ColName = new string[] { "保温前防腐刷油要求|LX|BWQFFSYYQ" }; popControl1.bind(); break; case "BWJRCLZL": this.BWJRGCBindingSource.Filter = string.Format("FL ='保温绝热工程' and BWLB ='保温层' and BWFL='管道' and JRCL is not null"); popControl1.DataSource = RemoveRepeat(BWJRGCBindingSource, "JRCL"); popControl1.ColName = new string[] { "保温绝热材料种类|JRCL|BWJRCLZL" }; popControl1.bind(); break; case "BWHD": //获取计算直径 即设备直径 this.GCZJZHBindingSource.Filter = string.Format("YSGG = '{0}'", currRow["GGXH"]); DataRowView sjzj = GCZJZHBindingSource.Current as DataRowView; decimal sbzj = sjzj == null ? -1 : ToolKit.ParseDecimal(sjzj["JSZJ"]); strString = new StringBuilder("FL='保温绝热工程' and BWLB ='保温层' and BWFL ='管道' and JRHD is not null"); strString.Append(string.IsNullOrEmpty(toString(currRow["BWJRCLZL"])) ? " and JRCL is null" : string.Format(" and JRCL ='{0}'", currRow["BWJRCLZL"])) .Append(sbzj == -1 ? " and MaxSBZJ is null" : string.Format(" and MaxSBZJ>={0}", sbzj)) .Append(sbzj == -1 ? " and MinSBZJ is null" : string.Format(" and MinSBZJ<={0}", sbzj)); this.BWJRGCBindingSource.Filter = strString.ToString(); //获取保温厚度范围 decimal minValue = -1; decimal maxValue = 0; int i = 0; foreach (DataRowView item in BWJRGCBindingSource) { if (item != null && item["JRHD"] != null) { string[] jrhd = toString(item["JRHD"]).Split('~'); if (jrhd.Length == 2) { if (i == 0) { minValue = decimal.Parse(jrhd[0]); maxValue = decimal.Parse(jrhd[1]); i++; } if (decimal.Parse(jrhd[0]) <= minValue) { minValue = decimal.Parse(jrhd[0]); } if (decimal.Parse(jrhd[1]) >= maxValue) { maxValue = decimal.Parse(jrhd[1]); } } } } repositoryItemSpinEdit1.MaxValue = maxValue; repositoryItemSpinEdit1.MinValue = minValue; break; case "FCCBHCCL": this.BWJRGCBindingSource.Filter = string.Format("FL ='保温绝热工程' and BWLB ='防潮层、保护层' and BWFL='管道' and JRCL is not null"); popControl1.DataSource = RemoveRepeat(BWJRGCBindingSource, "JRCL"); popControl1.ColName = new string[] { "防潮层保护层材料|JRCL|FCCBHCCL" }; popControl1.bind(); break; case "BWHFFSYYQ": this.FFSYCXBindingSource.Filter = string.Format("FL ='防腐刷油工程' and (BW ='管道刷油' or BW ='管道防腐') and LX is not null"); popControl1.DataSource = RemoveRepeat(FFSYCXBindingSource, "LX"); popControl1.ColName = new string[] { "保温后防腐刷油要求|LX|BWHFFSYYQ" }; popControl1.bind(); break; case "ZDJ": string str_zdj = "制作、安装"; popControl1.DataSource = strToTable(str_zdj, "ZDJ", ','); popControl1.ColName = new string[] { "支吊架|ZDJ|ZDJ" }; popControl1.bind(); break; } }
void ViewFieldConfig_CustomRowCellEdit(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { if (e.Column.FieldName == "Format") { DataRow dr = ViewFieldConfig.GetDataRow(e.RowHandle); if (dr != null) { STFieldConfigsInfo configInfo = (STFieldConfigsInfo) new STFieldConfigsController().GetObjectFromDataRow(dr); if (configInfo != null) { if (DataStructureProvider.DataTablesList.ContainsKey(configInfo.TableName)) { String strType = DataStructureProvider.GetCodingType(configInfo.TableName, configInfo.FieldName); if (strType == "DateTime" || strType == "Nullable<DataTime>" || strType == "int" || strType == "double" || strType == "decimal") { e.RepositoryItem = repoFormat; return; } } } } e.RepositoryItem = null; } #region AssignedEnum if (e.Column.FieldName == "AssignedEnum") { DataRow dr = ViewFieldConfig.GetDataRow(e.RowHandle); if (dr != null) { STFieldConfigsInfo configInfo = (STFieldConfigsInfo) new STFieldConfigsController().GetObjectFromDataRow(dr); if (configInfo != null) { if (DataStructureProvider.DataTablesList.ContainsKey(configInfo.TableName)) { if (DataStructureProvider.GetCodingType(configInfo.TableName, configInfo.FieldName) == "String") { e.RepositoryItem = repoEnum; return; } } } } e.RepositoryItem = null; } #endregion if (e.Column.FieldName == "FilterString") { DataRow dr = ViewFieldConfig.GetDataRow(e.RowHandle); if (dr != null) { STFieldConfigsInfo configInfo = (STFieldConfigsInfo) new STFieldConfigsController().GetObjectFromDataRow(dr); if (configInfo != null) { if (DataStructureProvider.IsForeignKey(configInfo.TableName, configInfo.FieldName)) { e.RepositoryItem = this.repoFilter; return; } } } e.RepositoryItem = null; } }
private void gridView1_CustomRowCellEditForEditing(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { txtMaChucVu.Text = gridView1.GetRowCellValue(e.RowHandle, "MaCV").ToString(); txtTenChucVu.Text = gridView1.GetRowCellValue(e.RowHandle, "TenCV").ToString(); }
private void dtgValoresInstancia_CustomRowCellEdit(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { e.RepositoryItem.ReadOnly = true; }
private void gridView1_CustomRowCellEditForEditing(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { txtMaLoaiDoiTuong.Text = gridView1.GetRowCellValue(e.RowHandle, "LoaiDoiTuongId").ToString(); txtTenLoaiDoiTuong.Text = gridView1.GetRowCellValue(e.RowHandle, "tenLoaiDoiTuong").ToString(); }
private void bandedGridView1_CustomRowCellEditForEditing(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { }
//tree public CustomRowCellEditEventArgs(DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs orig) : base(orig.RowHandle, orig.Column, orig.RepositoryItem) { GridLike = true; }
private void gvAssetList_CustomRowCellEdit(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { }
private void gvRequest_CustomRowCellEdit(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { DataRow dr = gvRequest.GetDataRow(e.RowHandle); if (e.Column == colnon_po_route) { if (dr != null) { object oStatus = dr["NON_PO_ROUTE"]; if (oStatus == null || oStatus == DBNull.Value) { oStatus = ""; } if (oStatus.Equals("")) { e.RepositoryItem = riEmpty; } else { e.RepositoryItem = riRouteStatus; } } } else if (e.Column == colApprove) { if (dr != null) { object oStatus = dr["NON_PO_ROUTE"]; if (oStatus == null || oStatus == DBNull.Value) { oStatus = ""; } if (oStatus.Equals("") || oStatus.Equals("A")) { e.RepositoryItem = riApproveDecline; } else { e.RepositoryItem = riApproveDeclineDisable; } } } else if (e.Column == colWF_Approval_ID) { if (dr != null) { object oStatus = dr["NON_PO_ROUTE"]; object oOrigin = dr["Origin"]; object oSubType = dr["Submission_Type"]; if (oOrigin != null && oOrigin != DBNull.Value && oSubType != null && oSubType != DBNull.Value) { if (oOrigin.Equals("Web") && oSubType.Equals("Non-PO")) { if (oStatus.Equals("A") || oStatus.Equals("P")) { e.RepositoryItem = riWorkFlowLocked; } else { e.RepositoryItem = riWorkflow; } } else if (oOrigin.Equals("Web") && oSubType.Equals("PO")) { if (oStatus.Equals("A") || oStatus.Equals("P")) { e.RepositoryItem = riWorkFlowLocked; } else { object oSUB_TYPE_C = dr["SUB_TYPE_C"]; if (oSUB_TYPE_C.Equals("I")) { int iWF_ID = -1; int iPRI_ID = -1; string sSQL = @"select isnull(p.wf_approval_id,-1), isnull(w.PRI_ID,-1) from AP_PayReqApprover a join WS_INV_HEADER w on w.WS_INV_ID=a.WS_INV_ID left outer join po_header p on p.PO_ID=w.po_id where a.id=" + dr["id"]; DataTable dt = Connection.SQLExecutor.ExecuteDataAdapter(sSQL, Connection.TRConnection); if (dt != null) { if (dt.Rows.Count > 0) { DataRow drE = dt.Rows[0]; if (drE != null) { object obj = drE[0]; if (obj != null && obj != DBNull.Value) { iWF_ID = Convert.ToInt32(obj); } obj = drE[1]; if (obj != null && obj != DBNull.Value) { iPRI_ID = Convert.ToInt32(obj); } if (iWF_ID == -1 && iPRI_ID == -1) { e.RepositoryItem = riWorkflow; } else { e.RepositoryItem = riEmpty; } } else { e.RepositoryItem = riEmpty; } } else { e.RepositoryItem = riEmpty; } } else { e.RepositoryItem = riEmpty; } } else if (oSUB_TYPE_C.Equals("H")) { e.RepositoryItem = riWorkFlowLocked; } else { e.RepositoryItem = riEmpty; } } } else { e.RepositoryItem = riEmpty; } } else { e.RepositoryItem = riEmpty; } } } }
private void gvSettings_CustomRowCellEditForEditing(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { DrawValueMembers(e); }
private void gridView1_CustomRowCellEditForEditing(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { DataRowView currRow = this.bindingSource1.Current as DataRowView; if (null == currRow) { return; } popControl1.PopupControl.Size = new Size(e.Column.Width, popControl1.PopupControl.Height); switch (e.Column.FieldName) { case "FL": popControl1.DataSource = this.NSFFFLBindingSource; NSFFFLBindingSource.Filter = ""; //字符串截断 并去重复 DataTable dt_fl = this.NSFFFLBindingSource.DataSource as DataTable; popControl1.DataSource = this.RemoveRepeat(this.strToTable(NSFFFLBindingSource, "FL", ','), "FL"); popControl1.ColName = new string[] { "分类|FL|FL" }; //清除依赖项数据 popControl1.RemoveDefaultColName = new string[] { "NSFFCLZL", "HD" }; popControl1.bind(); break; case "NSFFCLZL": popControl1.DataSource = this.NSFFDEBindingSource; this.NSFFDEBindingSource.Filter = string.Format(" FL = '{0}' and CLZL is not null ", toString(currRow["FL"])); //去重复 DataTable dt_ns = this.NSFFDEBindingSource.DataSource as DataTable; popControl1.DataSource = this.RemoveRepeat(dt_ns, "CLZL"); popControl1.ColName = new string[] { "耐酸防腐材料种类|CLZL|NSFFCLZL" }; //清除依赖项数据 popControl1.RemoveDefaultColName = new string[] { "HD" }; popControl1.bind(); break; case "HD": this.NSFFDEBindingSource.Filter = string.Format(" (FL is null or FL = '{0}') and (CLZL is null or CLZL = '{1}') and HD is not null", toString(currRow["FL"]), toString(currRow["NSFFCLZL"])); //去重复 DataTable dt_hd = this.NSFFDEBindingSource.DataSource as DataTable; popControl1.DataSource = this.RemoveRepeat(dt_hd, "HD"); popControl1.ColName = new string[] { "厚度(mm)|HD|HD" }; popControl1.bind(); break; case "GLCCLZL": popControl1.DataSource = this.GLCDEBindingSource; this.GLCDEBindingSource.Filter = ""; popControl1.ColName = new string[] { "隔离层材料种类|GLCZL|GLCCLZL" }; popControl1.bind(); break; } }