private void radButton_ver_Click(object sender, EventArgs e)
 {
     try
     {
         if (radGridView_cobros.Rows.Count > 0)
         {
             if (radGridView_cobros.CurrentCell != null)
             {
                 if (radGridView_cobros.CurrentCell.RowIndex != -1)
                 {
                     RadFormCobro radForm = new RadFormCobro
                     {
                         Sesion = Sesion,
                         Deuda  = CControl.cDeuda.Sp_listar_deudaxiddeudaxestado(
                             int.Parse(radGridView_cobros.Rows[radGridView_cobros.CurrentCell.RowIndex].Cells["iddeuda"].Value.ToString())
                             ),
                         Cobro = CControl.cCobro.Sp_listar_cobroxidcobro(
                             int.Parse(radGridView_cobros.Rows[radGridView_cobros.CurrentCell.RowIndex].Cells["idcobro"].Value.ToString())
                             ),
                         radform_listadecobros = this
                     };
                     radForm.ShowDialog();
                 }
             }
         }
     }
     catch (Exception ex)
     {
         RadMessageBox.Show(ex.Message.ToString());
     }
 }
Example #2
0
        private void radButton_pagar_Click(object sender, EventArgs e)
        {
            try
            {
                if (radGridView_deudas.Rows.Count > 0)
                {
                    if (radGridView_deudas.CurrentCell != null)
                    {
                        if (radGridView_deudas.CurrentCell.RowIndex != -1)
                        {
                            RadFormCobro radForm = new RadFormCobro
                            {
                                Sesion = Sesion,
                                Deuda  = new Deuda()
                                {
                                    Iddeuda = int.Parse(radGridView_deudas.Rows[radGridView_deudas.CurrentCell.RowIndex].Cells["iddeuda"].Value.ToString()),
                                    Cliente = new Cliente()
                                    {
                                        Idcliente = int.Parse(radGridView_deudas.Rows[radGridView_deudas.CurrentCell.RowIndex].Cells["idcliente"].Value.ToString())
                                    },
                                    Montoinicial = decimal.Parse(radGridView_deudas.Rows[radGridView_deudas.CurrentCell.RowIndex].Cells["montoinicial"].Value.ToString()),
                                    Montototal   = decimal.Parse(radGridView_deudas.Rows[radGridView_deudas.CurrentCell.RowIndex].Cells["montototal"].Value.ToString()),
                                    Montocobrado = decimal.Parse(radGridView_deudas.Rows[radGridView_deudas.CurrentCell.RowIndex].Cells["montocobrado"].Value.ToString()),
                                    Montoactual  = decimal.Parse(radGridView_deudas.Rows[radGridView_deudas.CurrentCell.RowIndex].Cells["montoactual"].Value.ToString()),
                                    Estado       = int.Parse(radGridView_deudas.Rows[radGridView_deudas.CurrentCell.RowIndex].Cells["estado"].Value.ToString())
                                }
                            };
                            radForm.ShowDialog();

                            radButton_cargar.PerformClick();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                RadMessageBox.Show(ex.Message.ToString());
            }
        }