Exemplo n.º 1
0
 public void ActualizarBeneficiarioBtn_Click()
 {
     try
     {
         SociosLogic socios = new SociosLogic();
         if (socios.EditCienPorciento(this.EditsocioIdTxt.Text, this.EditBenefId.Text, Convert.ToInt32(this.EditBenefPorcentaje.Text)))
         {
             socios.ActualizarBeneficiario(this.EditsocioIdTxt.Text, this.EditBenefId.Text,
                                           this.EditBenefNombre.Text, this.EditBenefParentezco.Text, this.EditBenefNacimiento.Text,
                                           this.EditBenLugarNac.Text, this.EditBenefPorcentaje.Text);
             EditarBeneficiarioWin.Hide();
             Beneficiarios_Refresh(null, null);
             X.Msg.Alert("Beneficiario", "Beneficiario Actualizado Correctamente.").Show();
         }
         else
         {
             X.Msg.Alert("Beneficiario", "ERROR: El porcentaje excede del 100% del capital.").Show();
         }
     }
     catch (Exception ex)
     {
         log.Fatal("Error fatal al actualizar beneficiario.", ex);
         throw;
     }
 }
Exemplo n.º 2
0
        public void listar()
        {
            SociosLogic socl = new SociosLogic();

            this.dgvSocios.DataSource = socl.TraerTodosEstadoActual();
            this.lbContador.Text      = "Cantidad de registros: " + Convert.ToString(this.dgvSocios.RowCount);
        }
Exemplo n.º 3
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            SociosLogic soc = new SociosLogic();

            dgvSocios.DataSource = soc.TraerPorApellidoEstadoActual(this.txtBuscar.Text);
            this.lbContador.Text = "Cantidad de registros: " + Convert.ToString(this.dgvSocios.RowCount);
        }
Exemplo n.º 4
0
        public override void GuardarCambios()
        {
            MapearADatos();
            SociosLogic soc = new SociosLogic();

            soc.Save(Socioactual);
        }
Exemplo n.º 5
0
        public void LoadAportacionesOrdinariaYExtraordinaria()
        {
            try
            {
                string socios_id = this.AddSociosIdTxt.Text;

                if (SociosLogic.DebePagarAportacionOrdinaria(socios_id))
                {
                    this.AddAportacionOrdinariaTxt.Text = this.Variables["HOJAS_APORTACIONORD"];
                }
                else
                {
                    this.AddAportacionOrdinariaTxt.Text = (0).ToString();
                }



                if (SociosLogic.DebePagarAportacionExtraordinaria(socios_id))
                {
                    this.AddAportacionExtraOrdinariaTxt.Text = this.Variables["HOJAS_APORTACIONEXTRAORD"];
                }
                else
                {
                    this.AddAportacionExtraOrdinariaTxt.Text = (0).ToString();
                }
            }
            catch (Exception ex)
            {
                log.Fatal("Error fatal al cargar aportaciones ordinaria y extraordinaria de variables de entorno.", ex);
                throw;
            }
        }
Exemplo n.º 6
0
        public void Listar()
        {
            SociosLogic soc = new SociosLogic();

            this.dataListado.DataSource = soc.GetAll();
            this.lbContador.Text        = "Cantidad de registros: " + Convert.ToString(dataListado.RowCount);
        }
Exemplo n.º 7
0
        public ABMSocios(int ID, ModoForm modo) : this()
        {
            SociosLogic soc = new SociosLogic();

            Modo        = modo;
            Socioactual = soc.GetOne(ID);
            MapearDeDatos();
        }
Exemplo n.º 8
0
 protected void SociosSt_Update(object sender, DirectEventArgs e)
 {
     try
     {
         SociosLogic soc      = new SociosLogic();
         int         anual    = Convert.ToInt32(e.ExtraParams["PRODUCCION_ANUAL"]);
         int         manzanas = Convert.ToInt32(e.ExtraParams["PRODUCCION_MANZANAS_CULTIVADAS"]);
         soc.ActualizarSocio(e.ExtraParams["SOCIOS_ID"],
                             e.ExtraParams["SOCIOS_PRIMER_NOMBRE"],
                             e.ExtraParams["SOCIOS_SEGUNDO_NOMBRE"],
                             e.ExtraParams["SOCIOS_PRIMER_APELLIDO"],
                             e.ExtraParams["SOCIOS_SEGUNDO_APELLIDO"],
                             e.ExtraParams["SOCIOS_RESIDENCIA"],
                             e.ExtraParams["SOCIOS_ESTADO_CIVIL"],
                             e.ExtraParams["SOCIOS_LUGAR_DE_NACIMIENTO"],
                             e.ExtraParams["SOCIOS_FECHA_DE_NACIMIENTO"],
                             e.ExtraParams["SOCIOS_NIVEL_EDUCATIVO"],
                             e.ExtraParams["SOCIOS_IDENTIDAD"],
                             e.ExtraParams["SOCIOS_PROFESION"],
                             e.ExtraParams["SOCIOS_RTN"],
                             e.ExtraParams["SOCIOS_TELEFONO"],
                             e.ExtraParams["SOCIOS_LUGAR_DE_EMISION"],
                             e.ExtraParams["SOCIOS_FECHA_DE_EMISION"],
                             e.ExtraParams["GENERAL_CARNET_IHCAFE"],
                             e.ExtraParams["GENERAL_ORGANIZACION_SECUNDARIA"],
                             e.ExtraParams["GENERAL_NUMERO_CARNET"],
                             e.ExtraParams["GENERAL_EMPRESA_LABORA"],
                             e.ExtraParams["GENERAL_EMPRESA_CARGO"],
                             e.ExtraParams["GENERAL_EMPRESA_DIRECCION"],
                             e.ExtraParams["GENERAL_EMPRESA_TELEFONO"],
                             e.ExtraParams["GENERAL_SEGURO"],
                             e.ExtraParams["GENERAL_FECHA_ACEPTACION"],
                             e.ExtraParams["PRODUCCION_UBICACION_FINCA"],
                             e.ExtraParams["PRODUCCION_AREA"],
                             e.ExtraParams["PRODUCCION_VARIEDAD"],
                             e.ExtraParams["PRODUCCION_ALTURA"],
                             e.ExtraParams["PRODUCCION_DISTANCIA"],
                             anual,
                             e.ExtraParams["PRODUCCION_BENEFICIO_PROPIO"],
                             e.ExtraParams["PRODUCCION_ANALISIS_SUELO"],
                             e.ExtraParams["PRODUCCION_TIPO_INSUMOS"],
                             manzanas, this.LoggedUserHdn.Text
                             );
         this.EditarSocioWin.Hide();
         SociosSt_Reload(null, null);
         SociosGridP.GetView().Refresh(false);
         SociosSt.DataSource = soc.getData();
         SociosSt.DataBind();
         X.Msg.Alert("Socio", "Socio Actualizado Exitosamente.").Show();
     }
     catch (Exception ex)
     {
         log.Fatal("Error fatal al actualizar socio.", ex);
         throw;
     }
 }
Exemplo n.º 9
0
 protected void SociosSt_Remove(object sender, DirectEventArgs e)
 {
     try
     {
         SociosLogic socios = new SociosLogic();
         socios.EliminarSocio(e.ExtraParams["SOCIOS_ID"]);
     }
     catch (Exception ex)
     {
         log.Fatal("Error fatal al eliminar socio.", ex);
         throw;
     }
 }
Exemplo n.º 10
0
 public void EliminarBeneficiarioBtn_Click()
 {
     try
     {
         SociosLogic socios = new SociosLogic();
         socios.EliminarBeneficiario(this.EditsocioIdTxt.Text, this.EditBenefId.Text);
         X.Msg.Alert("Beneficiario", "Beneficiario Eliminado Correctamente.").Show();
     }
     catch (Exception ex)
     {
         log.Fatal("Error fatal al eliminar beneficiario.", ex);
         throw;
     }
 }
Exemplo n.º 11
0
 protected void Beneficiarios_Refresh(object sender, StoreRefreshDataEventArgs e)
 {
     try
     {
         string      id    = this.EditsocioIdTxt.Text;
         SociosLogic socio = new SociosLogic();
         this.StoreBeneficiarios.DataSource = socio.getBenefxSocio(id);
         this.StoreBeneficiarios.DataBind();
     }
     catch (Exception ex)
     {
         log.Fatal("Error fatal al cargar beneficiarios.", ex);
         throw;
     }
 }
Exemplo n.º 12
0
        public void Buscar()
        {
            SociosLogic soc = new SociosLogic();

            if (txtBuscar.Text == string.Empty)
            {
                MessageBox.Show("Ingrese un socio a buscar");
            }
            else
            {
                this.dataListado.DataSource = soc.TraerPorApellido(this.txtBuscar.Text);

                this.btnBuscar.Text = "Listar";
            }
        }
Exemplo n.º 13
0
 protected void SociosSt_Reload(object sender, StoreRefreshDataEventArgs e)
 {
     try
     {
         SociosLogic soc    = new SociosLogic();
         var         store1 = this.SociosGridP.GetStore();
         store1.DataSource = soc.getData();
         store1.DataBind();
     }
     catch (Exception ex)
     {
         log.Fatal("Error fatal al cargar socios.", ex);
         throw;
     }
 }
Exemplo n.º 14
0
 public void Error100()
 {
     try
     {
         SociosLogic logica = new SociosLogic();
         bool        answer = logica.Igual100(this.EditsocioIdTxt.Text);
         if (answer)
         {
             X.Msg.Alert("Beneficiario", "Advertencia: Se le informa que no tiene asignado el 100% de sus aportaciones").Show();
         }
     }
     catch (Exception ex)
     {
         log.Fatal("Error fatal al validar porcentaje de beneficiarios.", ex);
         throw;
     }
 }
Exemplo n.º 15
0
 public void SetDatosAval()
 {
     try{
         SociosLogic     logica     = new SociosLogic();
         AportacionLogic aportacion = new AportacionLogic();
         if (EditAvalId.Text != "")
         {
             SolicitudesLogic solicitud = new SolicitudesLogic();
             EditAvalAntiguedad.Text = logica.Antiguedad(EditAvalId.Text);
             string avalNombreCompleto = solicitud.getAvalNombreCompleto(EditAvalId.Text);
             EditAvalNombre.Text       = avalNombreCompleto;
             EditAvalAportaciones.Text = aportacion.GetSaldoTotalAportacionesXSocio(EditAvalId.Text).ToString();
         }
     }
     catch (Exception ex)
     {
         log.Fatal("Error fatal al cargar datos del aval.", ex);
         throw;
     }
 }
Exemplo n.º 16
0
 protected void SociosSt_Enable(object sender, EventArgs e)
 {
     try
     {
         RowSelectionModel sm = SociosGridP.SelectionModel.Primary as RowSelectionModel;
         string            id = sm.SelectedRow.RecordID;
         if (confirm)
         {
             SociosLogic socios = new SociosLogic();
             socios.HabilitarSocio(id);
             confirm = false;
         }
         SociosSt_Reload(null, null);
     }
     catch (Exception ex)
     {
         log.Fatal("Error fatal al habilitar socio.", ex);
         throw;
     }
 }
Exemplo n.º 17
0
 public void CienPorciento()
 {
     try
     {
         SociosLogic logica = new SociosLogic();
         bool        answer = logica.Igual100(this.EditsocioIdTxt.Text);
         if (answer)
         {
             this.NuevoBeneficiarioWin.Show();
         }
         else
         {
             X.Msg.Alert("Alerta", "No se puede asignar mas del 100% de las aportaciones").Show();
         }
     }
     catch (Exception ex)
     {
         log.Fatal("Error fatal al validar porcentaje de beneficiarios.", ex);
         throw;
     }
 }
Exemplo n.º 18
0
        public void LoadCuotaDeIngresoYGastosAdmn()
        {
            try
            {
                string socios_id = this.AddSociosIdTxt.Text;

                if (SociosLogic.EsNuevo(socios_id) == true)
                {
                    this.AddCuotaIngresoTxt.Text = this.Variables["HOJAS_CUOTAINGRESO"];
                    this.AddGastosAdminTxt.Text  = this.Variables["HOJAS_GASTOADMINISTRACION"];
                }
                else
                {
                    this.AddCuotaIngresoTxt.Text = (0).ToString();
                    this.AddGastosAdminTxt.Text  = (0).ToString();
                }
            }
            catch (Exception ex)
            {
                log.Fatal("Error fatal al cargar cuota de ingreso y gastos de administracion de variables de entorno.", ex);
                throw;
            }
        }
Exemplo n.º 19
0
 public void AgregarBeneficiarioBtn_Click()
 {
     try
     {
         SociosLogic socios = new SociosLogic();
         if (socios.BuscarId(this.EditsocioIdTxt.Text, this.AddBenefID.Text))
         {
             if (socios.CienPorciento(this.EditsocioIdTxt.Text, Convert.ToInt32(this.AddBenefPorcentaje.Text)))
             {
                 socios.InsertarBeneficiario(this.EditsocioIdTxt.Text, this.AddBenefID.Text,
                                             this.AddBenefNombre.Text, this.AddBenefParentezco.Text, this.AddBenefFechaNacimiento.Text,
                                             this.AddBenefLugarNac.Text, this.AddBenefPorcentaje.Text);
                 bool answer = socios.Igual100(EditsocioIdTxt.Text);
                 if (!answer)
                 {
                     this.NuevoBeneficiarioWin.Hide();
                 }
                 this.NuevoBeneficiarioForm.Reset();
                 Beneficiarios_Refresh(null, null);
                 X.Msg.Alert("Beneficiario", "Beneficiario Agregado Correctamente.").Show();
             }
             else
             {
                 X.Msg.Alert("Beneficiario", "ERROR: El porcentaje excede del 100% del capital.").Show();
             }
         }
         else
         {
             X.Msg.Alert("Beneficiario", "ERROR: El beneficiario ya existe.").Show();
         }
     }
     catch (Exception ex)
     {
         log.Fatal("Error fatal al agregar beneficiario.", ex);
         throw;
     }
 }
Exemplo n.º 20
0
 protected void SociosSt_Insert(object sender, DirectEventArgs e)
 {
     try
     {
         SociosLogic soc   = new SociosLogic();
         int         anual = 0;
         if (AddAnualTxt.Text != null && AddAnualTxt.Text != "")
         {
             anual = Convert.ToInt32(AddAnualTxt.Text);
         }
         int manzanas = 0;
         if (AddManzanaTxt.Text != null && AddManzanaTxt.Text != "")
         {
             manzanas = Convert.ToInt32(AddManzanaTxt.Text);
         }
         soc.InsertarSocio(e.ExtraParams["SOCIOS_ID"],
                           e.ExtraParams["SOCIOS_PRIMER_NOMBRE"],
                           e.ExtraParams["SOCIOS_SEGUNDO_NOMBRE"],
                           e.ExtraParams["SOCIOS_PRIMER_APELLIDO"],
                           e.ExtraParams["SOCIOS_SEGUNDO_APELLIDO"],
                           e.ExtraParams["SOCIOS_RESIDENCIA"],
                           e.ExtraParams["SOCIOS_ESTADO_CIVIL"],
                           e.ExtraParams["SOCIOS_LUGAR_DE_NACIMIENTO"],
                           e.ExtraParams["SOCIOS_FECHA_DE_NACIMIENTO"],
                           e.ExtraParams["SOCIOS_NIVEL_EDUCATIVO"],
                           e.ExtraParams["SOCIOS_IDENTIDAD"],
                           e.ExtraParams["SOCIOS_PROFESION"],
                           e.ExtraParams["SOCIOS_RTN"],
                           e.ExtraParams["SOCIOS_TELEFONO"],
                           e.ExtraParams["SOCIOS_LUGAR_DE_EMISION"],
                           e.ExtraParams["SOCIOS_FECHA_DE_EMISION"],
                           AddCarnetIHCAFETxt.Text,
                           AddOrganizacionSecunTxt.Text,
                           AddNumCarnetTxt.Text,
                           AddEmpresaTxt.Text,
                           AddCargoTxt.Text,
                           AddDireccionTxt.Text,
                           AddEmpresaTelefonoTxt.Text,
                           AddSeguroTxt.Text,
                           AddFechaAceptacionTxt.Text,
                           AddUbicacionTxt.Text,
                           AddAreaTxt.Text,
                           AddVariedadTxt.Text,
                           AddAlturaTxt.Text,
                           AddDistanciaTxt.Text,
                           anual,
                           AddBeneficioTxt.Text,
                           AddAnalisisSueloTxt.Text,
                           AddTipoInsumosTxt.Text,
                           manzanas, this.LoggedUserHdn.Text
                           );
         NuevoSocioForm.Reset();
         SociosGridP.GetView().Refresh(false);
         this.NuevoSocioWin.Hide();
         SociosSt_Reload(null, null);
         X.Msg.Alert("Socio", "Socio Agregado Exitosamente.").Show();
     }
     catch (Exception ex)
     {
         log.Fatal("Error fatal al insertar socio.", ex);
         throw;
     }
 }