Example #1
0
        private void FgLista_CellButtonClick(object sender, C1.Win.C1FlexGrid.RowColEventArgs e)
        {
            if (b_Agregando == true)
            {
                return;
            }

            DataTable dtResult = new DataTable();

            if (FgLista.Col == 1)
            {
                string c_dato  = FgLista.GetData(FgLista.Row, 1).ToString();
                string c_idcon = funDatos.DataTableBuscar(dtConcepto, "c_des", "n_id", c_dato, "N").ToString();
                FgLista.SetData(FgLista.Row, 3, c_idcon);
            }
        }
Example #2
0
        private void FgLista_CellChanged(object sender, C1.Win.C1FlexGrid.RowColEventArgs e)
        {
            if (b_Agregando == true)
            {
                return;
            }
            double n_valor = 0;

            if (FgLista.Col == 1)
            {
                string c_dato   = FgLista.GetData(FgLista.Row, 1).ToString();
                double n_precio = Convert.ToDouble(funDatos.DataTableBuscar(dtConcepto, "c_des", "n_imp", c_dato, "C").ToString());
                int    n_idcon  = Convert.ToInt32(funDatos.DataTableBuscar(dtConcepto, "c_des", "n_id", c_dato, "C").ToString());

                FgLista.SetData(FgLista.Row, 2, n_precio.ToString("0.00"));
                FgLista.SetData(FgLista.Row, 3, n_idcon.ToString());
            }

            if (FgLista.Col == 2)
            {
                n_valor = Convert.ToDouble(FgLista.GetData(FgLista.Row, 2).ToString());
                FgLista.SetData(FgLista.Row, 2, n_valor.ToString("0.00"));
            }
        }