Exemplo n.º 1
0
        //#region funciones
        private void SetInsertarGeneral()
        {
            try
            {
                if (Int32.Parse(txt_idempresa.Value) == 0)
                {
                    eGeneral o = new eGeneral();
                    o._descripcion = txt_empresa.Text;
                    o._rucEmpresa = txt_ruc.Text;
                    o._anoVigente = Convert.ToInt32(txt_vigente.Text);
                    o._mesVigente = Convert.ToInt32(txt_mes_vig.Text);
                    o._Ruta_Archivo = txt_ruta_archivo.Text;
                    o._Nro_Decimal = Convert.ToInt32(txt_cantidad_decimal.Text);
                    o._tcaMes = Decimal.Parse(txt_tcamesCont.Text);
                    o._tcaAno = Decimal.Parse(txt_tcaCierre.Text);
                    o._estado = "A";
                    o._usureg = Session["username"].ToString();

                    bGeneralVC control = new bGeneralVC();
                    Int32 resp = control.SetInsertarGeneral(o);
                    if (resp != 0)
                    {
                        MessageBox("Registro Grabado Correctamente!");
                        ParametroList();
                    }
                    else
                    {
                        MessageBox("Ocurrio un Error en el Servidor!");
                    }
                }
                else
                {
                    SetActualizarGeneral();
                }
            }
            catch (Exception e) {
                MessageBoxcCatch("ERROR =>" + e.Message);
            }
        }
Exemplo n.º 2
0
 //LLENADO DE PARAMETROS
 private void ParametroList()
 {
     bGeneralVC bg = new bGeneralVC();
     List<eGeneral> list = bg.GetSelecionarGeneral();
     if (list.Count > 0)
     {
         txt_idempresa.Value = list[0]._idEmpresa.ToString();
         txt_empresa.Text = list[0]._descripcion.ToString();
         txt_ruc.Text = list[0]._rucEmpresa.ToString();
         txt_vigente.Text = list[0]._anoVigente.ToString();
         txt_mes_vig.Text = list[0]._mesVigente.ToString();
         txt_ruta_archivo.Text = list[0]._Ruta_Archivo;
         txt_cantidad_decimal.Text = list[0]._Nro_Decimal.ToString();
         txt_tcamesCont.Text = list[0]._tcaMes.ToString();
         txt_tcaCierre.Text = list[0]._tcaAno.ToString();
         bg.ParametroListSession();
     }
 }