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 CmdDelPro_Click(object sender, EventArgs e) { if (FgCli.Rows.Count == 1) { return; } FgCli.RemoveItem(FgCli.Row); }
private void CmdAddPro_Click(object sender, EventArgs e) { if (funFunciones.NulosC(FgCli.GetData(FgCli.Rows.Count - 1, 1)) == "") { MessageBox.Show("¡ No ha especificado un proveedor en la ultima fila !", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1); FgCli.Focus(); return; } FgCli.Rows.Count = FgCli.Rows.Count + 1; }