private void calibrGrid_AfterEdit(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { if (e.Cancel || calibrItem == null) { return; } float value; if (float.TryParse(calibrGrid[e.Row, e.Col].ToString(), out value)) { if (calibrItem.Table != null) { calibrItem.Table.SetValue(e.Col - 1, e.Row - 1, value); } else { calibrItem.RawValue = calibrItem.Convert2Source(value); } DoCalibrEdit(new CalibrEditArgs { CalibrItem = calibrItem, Value = value, Col = e.Col - 1, Row = e.Row - 1 }); } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void c1FlexGridFunc_AfterEdit(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { int rowIndex = e.Row; string id = this.c1FlexGridFunc.Rows[rowIndex]["ID"].ToString().Trim(); string SQLString = string.Format(@"UPDATE [HIS_InterfaceHN].[dbo].[Func] SET [FuncID] = N'{0}'--<FuncID, nvarchar(50),> , [Name] = N'{1}'--<Name, nvarchar(50),> , [Details] = N'{2}'--<Details, nvarchar(512),> WHERE ID = {3}", this.c1FlexGridFunc.Rows[rowIndex]["编码"].ToString().Trim(), this.c1FlexGridFunc.Rows[rowIndex]["名称"].ToString().Trim(), string.Empty, id); try { Alif.DBUtility.DbHelperSQL.ExecuteSql(SQLString); } catch (Exception ee) { CommonFunctions.MsgError("修改接口函数信息失败,失败原因:" + ee.Message); } }
private void flgView_Yb_AfterEdit(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { if (flgView_Yb.Cols[e.Col].Name == "dcSectFlag") { string s = flgView_Yb[e.Row, "项目代码"].ToString(); if (flgView_Yb[e.Row, e.Col].ToString() == Boolean.TrueString) { LisOutPutResult l = new LisOutPutResult(); l.Bblsh = yblsh; l.Yzxmdm = jyxmdm; l.Xmdm = s; l.Xmmc = flgView_Yb[e.Row, "项目名称"].ToString(); l.Xmywmc = flgView_Yb[e.Row, "项目英文名称"].ToString(); l.Xmjg = flgView_Yb[e.Row, "项目结果"].ToString(); l.Jgdw = flgView_Yb[e.Row, "单位"].ToString(); l.Ckz = flgView_Yb[e.Row, "参考值范围"].ToString(); l.Cssj = flgView_Yb[e.Row, "测试时间"].ToString(); l.Jgbz = flgView_Yb[e.Row, "标志"].ToString(); lisoutres.Add(l); } else { LisOutPutResult l = lisoutres.Find(delegate(LisOutPutResult lop) { return(lop.Bblsh == yblsh && lop.Yzxmdm == jyxmdm && lop.Xmdm == s); }); lisoutres.Remove(l); } } }
private void FgItems_CellChanged(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { if (booAgregando == true) { return; } if (n_QueHace == 3) { return; } if (e.Col == 6) { string c_valor = FgItems.GetData(FgItems.Row, 6).ToString(); FgItems.SetData(FgItems.Row, 7, Convert.ToDouble(c_valor).ToString("0.00")); Calcular(FgItems.Row); } if (e.Col == 7) { string c_valor = FgItems.GetData(FgItems.Row, 7).ToString(); FgItems.SetData(FgItems.Row, 6, Convert.ToDouble(c_valor).ToString("0.00")); Calcular(FgItems.Row); } SumarColumnas(); }
private void FgDetalle_CellChanged(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { DataTable dtUniMed = new DataTable(); int intProductoId = 0; int intUniMedId = 0; if (e.Col == 1) // SI SE HA SELECCIONADO ALGUN ITEM DE LA COLUMNA 1 { string strItemDescripcion = FgDetalle.GetData(e.Row, 1).ToString(); intProductoId = Convert.ToInt32(funDatos.DataTableBuscar(dtItems, "c_despro", "n_id", strItemDescripcion, "C")); // OBTENEMOS EL ID DEL ITEM SELECCIONADO FgDetalle.SetData(e.Row, 6, intProductoId); dtUniMed = funDatos.DataTableFiltrar(dtUnidadMedida, "n_idite = " + intProductoId + ""); // FILTRAMOS POR ID DEL PRODUCTO if (dtUniMed.Rows.Count != 0) { funFlex.FlexColumnaCombo(FgDetalle, dtUniMed, "c_abr", 2); } dtUniMed = funDatos.DataTableFiltrar(dtUniMed, "n_default = 1"); // FILTRAMOS LA UNIDAD DE MEDIDA POR DEFECTO FgDetalle.SetData(e.Row, 2, dtUniMed.Rows[0]["c_abr"].ToString()); // ESTABLECEMOS LA ABREVIATURA DE LA UNIDAD DE MEDIDA FgDetalle.SetData(e.Row, 7, dtUniMed.Rows[0]["n_idunimed"].ToString()); // ESTABLECEMOS EL ID DE LA UNIDAD DE MEDIDA double doupreuniigv = Convert.ToDouble(dtUniMed.Rows[0]["n_preuniigv"].ToString()); double doupreuni = Convert.ToDouble(dtUniMed.Rows[0]["n_preuni"].ToString()); FgDetalle.SetData(e.Row, 4, doupreuniigv.ToString("0.000000")); // ESTABLECEMOS EL PRECIO CON IGV DEL ITEM FgDetalle.SetData(e.Row, 8, doupreuni.ToString("0.000000")); // ESTABLECEMOS EL PRECIO SIN IGV DEL ITEM CalcularFila(e.Row); } if (e.Col == 2) // SI SE HA SELECCIONADO ALGUN ITEM DE LA COLUMNA 2 { intProductoId = Convert.ToInt32(FgDetalle.GetData(e.Row, 6)); string strUnidadMedidaDescripcion = FgDetalle.GetData(e.Row, 2).ToString(); intUniMedId = Convert.ToInt32(funDatos.DataTableBuscar(dtUnidadMedida, "c_abr", "n_idunimed", strUnidadMedidaDescripcion, "C")); FgDetalle.SetData(e.Row, 7, intUniMedId); dtUniMed = funDatos.DataTableFiltrar(dtUnidadMedida, "n_idunimed = " + intUniMedId + " AND n_idite = " + intProductoId + ""); // FILTRAMOS LA UNIDAD DE MEDIDA POR DEFECTO double doupreuniigv = Convert.ToDouble(dtUniMed.Rows[0]["n_preuniigv"].ToString()); double doupreuni = Convert.ToDouble(dtUniMed.Rows[0]["n_preuni"].ToString()); FgDetalle.SetData(e.Row, 2, dtUniMed.Rows[0]["c_abr"].ToString()); // ESTABLECEMOS LA ABREVIATURA DE LA UNIDAD DE MEDIDA FgDetalle.SetData(e.Row, 7, dtUniMed.Rows[0]["n_idunimed"].ToString()); // ESTABLECEMOS EL ID DE LA UNIDAD DE MEDIDA FgDetalle.SetData(e.Row, 4, doupreuniigv.ToString("0.000000")); // ESTABLECEMOS EL PRECIO CON IGV DEL ITEM FgDetalle.SetData(e.Row, 8, doupreuni.ToString("0.000000")); // ESTABLECEMOS EL PRECIO SIN IGV DEL ITEM CalcularFila(e.Row); } if ((e.Col == 3) || (e.Col == 4)) { if (e.Col == 4) { FgDetalle.SetData(FgDetalle.Row, 8, "0.00"); } CalcularFila(e.Row); } }
private void c1FlexGrid1_AfterEdit(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { if (c1FlexGrid1.Cols[e.Col].Name == "人工编号") { //if (!(c1FlexGrid1.Rows[e.Row]["位置编号"] is DBNull)) { // int index = int.Parse(c1FlexGrid1.Rows[e.Row]["位置编号"].ToString()); // if (!(c1FlexGrid1.Rows[e.Row]["人工编号"] is DBNull) && !(c1FlexGrid1.Rows[e.Row]["实验类型"] is DBNull)) userControlList[index].Caption = c1FlexGrid1.Rows[e.Row]["人工编号"].ToString(); } } if (c1FlexGrid1.Cols[e.Col].Name == "实验结果") { if (GlobalCofigData.SystemConfig.TestType == TestTypes.摩擦感度) { GlobalCofigData.SystemConfig.TargetDistance = GlobalCofigData.SystemConfig.PrepareH0; } else { GlobalCofigData.SystemConfig.SerialNo = GlobalCofigData.SystemConfig.SerialNo + 1; if (c1FlexGrid1.Rows[e.Row]["实验结果"].ToString() == "发火") { GlobalCofigData.SystemConfig.TargetDistance = GlobalCofigData.SystemConfig.TargetDistance + GlobalCofigData.SystemConfig.Step; } else { GlobalCofigData.SystemConfig.TargetDistance = GlobalCofigData.SystemConfig.TargetDistance - GlobalCofigData.SystemConfig.Step; } } } }
private void vs_BeforeEdit(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { if ((vs.Cols[e.Col].Name == "HUR_BT" || vs.Cols[e.Col].Name == "ACC_BT") && vs.Rows[e.Row]["BAS_BT"] + "" != "True") { e.Cancel = true; } }
private void cfgArticulos_AfterEdit(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { try { double Cantidad = double.Parse(cfgArticulos[e.Row, "Cantidad"].ToString()); double Devuelto = double.Parse(cfgArticulos[e.Row, "Devuelto"].ToString()); double Nuevo = double.Parse(cfgArticulos[e.Row, "Nuevo"].ToString()); double Pendiente = double.Parse(cfgArticulos[e.Row, "Pendiente"].ToString()); double Entregado = double.Parse(cfgArticulos[e.Row, "Entregado"].ToString()); if (Nuevo < 0) { MessageBox.Show("El nuevo pendiente no puede ser menor que 0", "Pendiente de Entrega", MessageBoxButtons.OK, MessageBoxIcon.Information); cfgArticulos[e.Row, "Nuevo"] = Cantidad - Devuelto; return; } if (Nuevo > (Cantidad - Devuelto)) { MessageBox.Show("El nuevo pendiente no puede ser mayor a la Cantidad original menos lo ya Devuelto", "Pendiente de Entrega", MessageBoxButtons.OK, MessageBoxIcon.Information); Nuevo = Cantidad - Devuelto; cfgArticulos[e.Row, "Nuevo"] = Nuevo; cfgArticulos[e.Row, "Pendiente"] = Nuevo; cfgArticulos[e.Row, "Entregado"] = Entregado - Nuevo; } else { cfgArticulos[e.Row, "Pendiente"] = Nuevo; cfgArticulos[e.Row, "Entregado"] = Cantidad - Nuevo; } } catch (Exception ex) { MessageBox.Show("Ocurrio el siguiente problema: " + ex.Message, "Pendiente de Entrega", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void FgRec_CellButtonClick(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { //if (b_Modificar == true) //{ // FgRec.AllowEditing = false; return; //} //if (booAgregando == true) { return; } ////if (FgRec.Col == 1) // TIPO DE EXISTENCIA ////{ ////} ////if (FgRec.Col == 2) // CODIGO DEL PRODUCTO ////{ ////} //if (FgRec.Col == 3) // DESCRIPCION DEL PRODUCTO //{ // string c_dato = FgRec.GetData(FgRec.Row, 3).ToString(); // c_dato = funDatos.DataTableBuscar(dtItems, "c_des", "c_cod", c_dato, "C").ToString(); // FgRec.SetData(FgRec.Row, 2, c_dato); //} //if (FgRec.Col == 4) // UNIDAD DE MEDIDA //{ //} //if (FgRec.Col == 5) // CANTIDAD //{ //} }
void c1FlexGrid1_CellChanged(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { // apply style to changed cells var cs = this.c1FlexGrid1.Styles["changed"]; this.c1FlexGrid1.SetCellStyle(e.Row, e.Col, cs); }
// ** initialize and hook up event handlers for the grid editors private void flex_SetupEditor(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { // Note that this routine first unhooks (-=) any old handlers that might // have been connected earlier, then hooks up (+=) the event handlers. // If you don't disconnect the handlers, they may be called multiple times. // This could be done in other ways (e.g. connect only once at startup), but // this is probably the safest approach. // set up the grid's combo box ComboBox cb = flex.Editor as ComboBox; if (cb != null) { // make this a real combo, even if we're using a DataMap cb.DropDownStyle = ComboBoxStyle.DropDown; // hook up combo event cb.SelectedIndexChanged -= new System.EventHandler(flexComboEditor_SelectedValueChanged); cb.SelectedIndexChanged += new System.EventHandler(flexComboEditor_SelectedValueChanged); // hook up textbox event cb.TextChanged -= new System.EventHandler(flexTextEditor_SelectedValueChanged); cb.TextChanged += new System.EventHandler(flexTextEditor_SelectedValueChanged); } // set up the grid's text box TextBox tb = flex.Editor as TextBox; if (tb != null) { tb.TextChanged -= new System.EventHandler(flexTextEditor_SelectedValueChanged); tb.TextChanged += new System.EventHandler(flexTextEditor_SelectedValueChanged); } }
private void FgItems_CellChanged(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { if (n_QueHace == 3) { FgItems.AllowEditing = false; return; } if (booAgregando == true) { return; } if (FgItems.Col == 1) { FgItems.Select(FgItems.Row - 1, 2); return; } if (FgItems.Col == 2) { FgItems.Select(FgItems.Row - 1, 3); return; } if (FgItems.Col == 3) { FgItems.Select(FgItems.Row - 1, 4); return; } if (FgItems.Col == 4) { FgItems.Select(FgItems.Row, 1); return; } }
private void _flex_AfterResizeRow(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { for (int i = 1; i < _flex.Rows.Count; i++) { _flex[i, 1] = _flex.Rows[i].Top; } }
private void FgItems_CellButtonClick(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { if (FgItems.Col == 1) { int n_idtipexi = 0; DataTable dtResul = new DataTable(); string c_dato = ""; b_Agregando = true; dtResul = objItems.BuscarItem("", "n_id", dtItems, n_idtipexi); if (dtResul != null) { if (dtResul.Rows.Count != 0) { c_dato = dtResul.Rows[0]["c_despro"].ToString(); // MOSTRAMOS LA DESCRIPCION DEL ITEM FgItems.SetData(FgItems.Row, 1, c_dato); c_dato = dtResul.Rows[0]["n_id"].ToString(); // MOSTRAMOS EL ID DEL ITEM FgItems.SetData(FgItems.Row, 4, c_dato); c_dato = dtResul.Rows[0]["n_idunimed"].ToString(); // MOSTRAMOS LA UNIDAD DE MEDIDA DEL ITEM FgItems.SetData(FgItems.Row, 5, c_dato); } } b_Agregando = false; } }
private void fg_StartEdit(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { try { //if (fg.Cols[e.Col].Name == "人工编号") //{ // fg.Editor = numberTextBox1; // numberTextBox1.DataType = SDAF.NumberTextBox.NumberTextBox.EnumType.String; // numberTextBox1.MaxLength = (short)DataOperate.dataSet11.Tables["Configure"].Rows[DataOperate.人工编号]["最大长度"]; // } //else if (fg.Cols[e.Col].Name == "备注") { fg.Editor = numberTextBox1; numberTextBox1.DataType = SDAF.NumberTextBox.NumberTextBox.EnumType.String; numberTextBox1.MaxLength = (short)DataOperate.dataSet11.Tables["Configure"].Rows[DataOperate.备注]["最大长度"]; } else { //fg.Editor = numberTextBox1; //numberTextBox1.DataType = SDAF.NumberTextBox.NumberTextBox.EnumType.Integer; //numberTextBox1.MaxLength = 4; //numberTextBox1.IsCheckValue = false; } } catch (Exception err) { MessageBox.Show(err.ToString().ToString(), Properties.Resources.ErrorCaption, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void FgItem_CellButtonClick(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { if (FgItem.Col == 1) { DataTable dtResul = new DataTable(); string c_dato = ""; int n_idtippro = Convert.ToInt32(CboTipPro.SelectedValue); if (n_idtippro == 0) { dtResul = objItems.BuscarItem("", "n_id", dtItem, n_idtippro); } else { dtResul = objItems.BuscarItem("", "n_id", dtItem, n_idtippro); } if (dtResul != null) { if (dtResul.Rows.Count != 0) { c_dato = dtResul.Rows[0]["c_despro"].ToString(); // MOSTRAMOS LA DESCRIPCION DEL ITEM FgItem.SetData(FgItem.Row, 1, c_dato); c_dato = dtResul.Rows[0]["n_id"].ToString(); // MOSTRAMOS EL ID DEL ITEM FgItem.SetData(FgItem.Row, 2, c_dato); FgItem.Rows.Count = FgItem.Rows.Count + 1; } } } }
private void gGrid1_AfterEdit(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { if (e.Col == 4) { dropLocation.DefaultCondition = CK.K["WRHSCODE"].Eq(dropWarehouse.Value); } }
private void FgItems_CellButtonClick(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { if (n_QueHace == 3) { return; } if (booAgregando == true) { return; } if (Convert.ToDouble(funFunciones.NulosN(LblTc.Text)) == 0) { MessageBox.Show("! No ha especificado el tipo de cambio ", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1); return; } if (FgItems.Col == 1) { DataTable dtResult = new DataTable(); dtResult = objPlaCue.BuscarCuenta(dtPlaCue); if (dtResult != null) { FgItems.SetData(FgItems.Row, 1, dtResult.Rows[0]["c_cuecon"].ToString()); FgItems.SetData(FgItems.Row, 2, dtResult.Rows[0]["c_des"].ToString()); FgItems.SetData(FgItems.Row, 7, dtResult.Rows[0]["n_id"].ToString()); } } }
private void FgIns_CellButtonClick(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { if (FgIns.Col == 1) { DataTable dtResult = new DataTable(); string c_dato = ""; objItems.mysConec = mysConec; dtResult = objItems.BuscarItem("", "n_id", dtIns, 0); if (dtResult != null) { if (dtResult.Rows.Count != 0) { c_dato = dtResult.Rows[0]["c_despro"].ToString(); FgIns.SetData(FgIns.Row, 1, c_dato); c_dato = dtResult.Rows[0]["n_id"].ToString(); FgIns.SetData(FgIns.Row, 2, c_dato); if (funFunciones.NulosC(FgIns.GetData(FgIns.Rows.Count - 1, 1)) != "") { FgIns.Rows.Count = FgIns.Rows.Count + 1; } } } } }
private void FgPer_CellChanged(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { if (n_QueHace == 3) { return; } if (booAgregando == true) { return; } if (funFunciones.NulosC(FgPer.GetData(FgPer.Row, 2)) == "") { return; } string c_dato = ""; if (FgPer.Col == 2) { booAgregando = true; c_dato = FgPer.GetData(FgPer.Row, 2).ToString(); c_dato = funDatos.DataTableBuscar(dtPersonal, "c_apenom", "n_id", c_dato, "C").ToString(); FgPer.SetData(FgPer.Row, 6, c_dato); booAgregando = false; } AgregarPersonaaLista(FgPer.Row); }
private void cfgArticulos_AfterEdit(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { try { double Pendiente = double.Parse(cfgArticulos[e.Row, "Pendiente"].ToString()); double AEntregar = double.Parse(cfgArticulos[e.Row, "AEntregar"].ToString()); if (AEntregar < 0) { MessageBox.Show("El A Entregar no puede ser menor que 0", "Vale de Entrega", MessageBoxButtons.OK, MessageBoxIcon.Information); cfgArticulos[e.Row, "AEntregar"] = Pendiente; return; } if (AEntregar > Pendiente) { MessageBox.Show("El A Entregar no puede ser mayor a la Cantidad Pendiente", "Vale de Entrega", MessageBoxButtons.OK, MessageBoxIcon.Information); cfgArticulos[e.Row, "AEntregar"] = Pendiente; } else { cfgArticulos[e.Row, "Pendiente"] = Pendiente - AEntregar; } } catch (Exception ex) { MessageBox.Show("Ocurrio el siguiente problema: " + ex.Message, "Vale de Entrega", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void FgItems_CellChanged(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { if (n_QueHace == 3) { return; } double n_valor = 0; double n_precio = 0; double n_tasigv = 0; if (FgItems.Col == 4) { n_valor = Convert.ToDouble(FgItems.GetData(e.Row, 4)); n_tasigv = Convert.ToDouble(FgItems.GetData(e.Row, 5)); n_precio = n_valor * ((n_tasigv / 100) + 1); FgItems.SetData(e.Row, 6, n_precio.ToString("0.00")); } if (FgItems.Col == 6) { n_valor = Convert.ToDouble(FgItems.GetData(e.Row, 6)); n_tasigv = Convert.ToDouble(FgItems.GetData(e.Row, 5)); n_precio = n_valor / ((n_tasigv / 100) + 1); FgItems.SetData(e.Row, 4, n_precio.ToString("0.00")); } }
private void FgTar_CellChanged(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { if (booAgregando == true) { return; } if (n_QueHace == 3) { FgTar.AllowEditing = false; return; } //if (FgTar.Col == 5) //{ // int n_numper = 0; // n_numper = Convert.ToInt32(FgTar.GetData(FgTar.Row, 5).ToString()); // FgPer.Rows.Count = 2; // int n_row = 0; // string c_dato = FgTar.GetData(FgTar.Row, 3).ToString(); // booAgregando = true; // for (n_row = 0; n_row <= n_numper - 1; n_row++) // { // FgPer.Rows.Count = FgPer.Rows.Count + 1; // FgPer.SetData(FgPer.Rows.Count - 1, 2, c_dato); // } // n_FilaTareaActual = FgTar.Row; // booAgregando = false; //} }
private void FgCuenta_CellButtonClick(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { if (FgCuenta.Col == 1) { DataTable dtResult = new DataTable(); string c_dato = ""; o_Cuenta.mysConec = mysConec; dtResult = o_Cuenta.BuscarCuenta(dtCuenta); if (dtResult != null) { if (dtResult.Rows.Count != 0) { c_dato = dtResult.Rows[0]["c_cuecon"].ToString(); FgCuenta.SetData(FgCuenta.Row, 1, c_dato); c_dato = dtResult.Rows[0]["c_des"].ToString(); FgCuenta.SetData(FgCuenta.Row, 2, c_dato); c_dato = dtResult.Rows[0]["n_id"].ToString(); FgCuenta.SetData(FgCuenta.Row, 3, c_dato); FgCuenta.Rows.Count = FgCuenta.Rows.Count + 1; } } } }
private void FgItems_CellButtonClick(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { if (FgItems.Col == 1) { //int n_idtipexi = 0; DataTable dtResul = new DataTable(); string c_dato = ""; dtResul = funDatos.DataTableFiltrar(dtItem, "n_idtipexi IN (1, 2)"); dtResul = objIte.BuscarItem("", "n_id", dtResul, 2); if (dtResul != null) { if (dtResul.Rows.Count != 0) { c_dato = dtResul.Rows[0]["c_despro"].ToString(); // MOSTRAMOS LA DESCRIPCION DEL ITEM FgItems.SetData(FgItems.Row, 1, c_dato); c_dato = dtResul.Rows[0]["n_id"].ToString(); // MOSTRAMOS EL ID DEL ITEM FgItems.SetData(FgItems.Row, 2, c_dato); FgItems.Rows.Count = FgItems.Rows.Count + 1; } } } }
private void vs1_AfterEdit(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { if (vs1.Cols[e.Col].Name == "UNT_PR" || vs1.Cols[e.Col].Name == "TOP_PR") { vs1.Rows[e.Row]["AMT_PR"] = T_String.IsNullTo00(vs1.Rows[e.Row]["UNT_PR"] + "") + T_String.IsNullTo00(vs1.Rows[e.Row]["TOP_PR"] + ""); } }
private void fg_BeforeEdit(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { try { if (fg[e.Row, e.Col] != null) { oldText = fg[e.Row, e.Col].ToString(); } } catch (Exception err) { // System.NullReferenceException: 未将对象引用设置到对象的实例。 //在 SDAF.DataBase.FormMain.fg_BeforeEdit(Object sender, RowColEventArgs e) //在 C1.Win.C1FlexGrid.C1FlexGridBase.OnBeforeEdit(RowColEventArgs e) //在 C1.Win.C1FlexGrid.C1FlexGridBase.az(Int32 A_0, Int32 A_1) //在 C1.Win.C1FlexGrid.y.ao(Boolean A_0) //在 C1.Win.C1FlexGrid.y.ah(MouseEventArgs A_0) //在 C1.Win.C1FlexGrid.C1FlexGridBase.OnMouseDown(MouseEventArgs e) //在 System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks) //在 System.Windows.Forms.Control.WndProc(Message& m) //在 C1.Win.C1FlexGrid.Util.BaseControls.ScrollableControl.WndProc(Message& m) //在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) //在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) //在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) } }
private void FgCli_CellButtonClick(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { if (FgCli.Col == 1) { DataTable dtResult = new DataTable(); string c_dato = ""; objPro.mysConec = mysConec; dtResult = objPro.BuscarCliPro(dtProv, 1, "n_id", ""); if (dtResult != null) { if (dtResult.Rows.Count != 0) { c_dato = dtResult.Rows[0]["c_nombre"].ToString(); FgCli.SetData(FgCli.Row, 1, c_dato); c_dato = dtResult.Rows[0]["n_id"].ToString(); FgCli.SetData(FgCli.Row, 2, c_dato); if (funFunciones.NulosC(FgCli.GetData(FgCli.Rows.Count - 1, 1)) != "") { FgCli.Rows.Count = FgCli.Rows.Count + 1; } } } } }
private void vs_AfterEdit(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { if (vs.Row > 0) { vs.Rows[vs.Row]["LST_NM"] = PublicFunction.A_UserID; vs.Rows[vs.Row]["LST_DT"] = T_String.GetDate().ToString("yyyy/MM/dd HH:mm"); } }
private void c1FlexGrid1_MouseLeaveCell(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { if (e.Row < 1 || e.Row == _row) { return; } //this.c1SuperTooltip1.Hide(c1FlexGrid1); }