Ejemplo n.º 1
0
        protected void lnk_change_status_click(object sender, CommandEventArgs args)
        {
            try
            {
                int Id = 0;
                int.TryParse(args.CommandName, out Id);
                bool status = false;
                bool.TryParse(args.CommandArgument.ToString(), out status);

                Cuenta_tipo oC = new Cuenta_tipo();
                oC.Id = Id;
                Cuenta_tipoMng oCTMng = new Cuenta_tipoMng();
                oCTMng.O_Cuenta_tipo = oC;

                if (status)
                {
                    oCTMng.dlt();
                }
                else
                {
                    oCTMng.reactive();
                }

                oCTMng = new Cuenta_tipoMng();
                oCTMng.fillAllLst();
                fillCatalog(oCTMng.Lst);
            }
            catch (Exception e)
            {
                ((MstCasc)this.Master).setError = e.Message;
            }
        }
Ejemplo n.º 2
0
        private Entrada addEntradaValuesCompartida()
        {
            Entrada oE = new Entrada();

            oE.Folio = hfFolio.Value.ToString();

            try
            {
                oE = getEntradaCompartida(oE.Folio);
                setFormValuesCompartida(oE);

                EntradaCtrl.AddEntradaCompartida(oE);

                oE.PUsuario = ((MstCasc)this.Master).getUsrLoged();

                DocumentoMng oDocMng = new DocumentoMng();
                foreach (Entrada_documento itemSD in VSLstED)
                {
                    Documento oDoc = new Documento();
                    oDoc.Id             = itemSD.Id_documento;
                    oDocMng.O_Documento = oDoc;
                    oDocMng.selById();
                    itemSD.PDocumento = oDoc;
                }
                oE.PLstEntDoc = VSLstED;

                Bodega oB = new Bodega();
                oB.Id = oE.Id_bodega;
                BodegaMng oBMng = new BodegaMng();
                oBMng.O_Bodega = oB;
                oBMng.selById();
                oE.PBodega = oB;

                Cortina oCor = new Cortina();
                oCor.Id        = oE.Id_cortina;
                oCor.Nombre    = ddlCortina.SelectedItem.Text;
                oCor.Id_bodega = oE.Id_bodega;
                oE.PCortina    = oCor;

                oE.PCliente = CatalogCtrl.Cliente_GetById(oE.Id_cliente);

                Cuenta_tipoMng oCTMng = new Cuenta_tipoMng();
                Cuenta_tipo    oCT    = new Cuenta_tipo();
                oCT.Id = oE.PCliente.Id_cuenta_tipo;
                oCTMng.O_Cuenta_tipo = oCT;
                oCTMng.selById();
                oE.PCliente.cuenta_tipo = oCT.Nombre;

                Custodia oCdia = new Custodia();
                oCdia.Id     = oE.Id_custodia;
                oCdia.Nombre = ddlCustodia.SelectedItem.Text;
                oE.PCustodia = oCdia;
            }
            catch (Exception)
            {
                throw;
            }
            return(oE);
        }
Ejemplo n.º 3
0
        public static void fillCuentaTipo(DropDownList ddlCuentaTipo)
        {
            Cuenta_tipoMng oCTMng = new Cuenta_tipoMng();

            oCTMng.fillLst();
            ddlCuentaTipo.DataSource     = oCTMng.Lst;
            ddlCuentaTipo.DataTextField  = "nombre";
            ddlCuentaTipo.DataValueField = "id";
            ddlCuentaTipo.DataBind();
        }
Ejemplo n.º 4
0
 private void udtCuentaTipo(Cuenta_tipo oCT)
 {
     try
     {
         Cuenta_tipoMng oCTMng = new Cuenta_tipoMng();
         oCTMng.O_Cuenta_tipo = oCT;
         oCTMng.udt();
     }
     catch
     {
         throw;
     }
 }
Ejemplo n.º 5
0
 protected void Page_Load(object sender, EventArgs args)
 {
     if (!IsPostBack)
     {
         try
         {
             Cuenta_tipoMng oCTMng = new Cuenta_tipoMng();
             oCTMng.fillAllLst();
             fillCatalog(oCTMng.Lst);
         }
         catch (Exception e)
         {
             ((MstCasc)this.Master).setError = e.Message;
         }
     }
 }
Ejemplo n.º 6
0
        private void fillForm()
        {
            int Id = 0;

            int.TryParse(hfId.Value, out Id);

            try
            {
                Cuenta_tipoMng oCTMng = new Cuenta_tipoMng();
                Cuenta_tipo    oCT    = new Cuenta_tipo();
                oCT.Id = Id;
                oCTMng.O_Cuenta_tipo = oCT;
                oCTMng.selById();

                txt_nombre.Text = oCT.Nombre;
            }
            catch
            {
                throw;
            }
        }
Ejemplo n.º 7
0
        private Salida addSalidaValuesCompartida()
        {
            Salida oS = new Salida();

            oS.Folio = hfFolio.Value.ToString();

            try
            {
                oS = getSalidaCompartida(oS.Folio);
                setFormValuesCompartida(oS);

                SalidaCtrl.AddSalidaCompartida(oS);

                oS.PUsuario = ((MstCasc)this.Master).getUsrLoged();

                DocumentoMng oDocMng = new DocumentoMng();
                foreach (Salida_documento itemSD in VSLstSD)
                {
                    Documento oDoc = new Documento();
                    oDoc.Id             = itemSD.Id_documento;
                    oDocMng.O_Documento = oDoc;
                    oDocMng.selById();
                    itemSD.PDocumento = oDoc;
                }
                oS.PLstSalDoc = VSLstSD;

                Bodega oB = new Bodega();
                oB.Id = oS.Id_bodega;
                BodegaMng oBMng = new BodegaMng();
                oBMng.O_Bodega = oB;
                oBMng.selById();
                oS.PBodega = oB;

                Cortina oCor = new Cortina();
                oCor.Id        = oS.Id_cortina;
                oCor.Nombre    = ddlCortina.SelectedItem.Text;
                oCor.Id_bodega = oS.Id_bodega;
                oS.PCortina    = oCor;

                Cliente oC = CatalogCtrl.Cliente_GetById(oS.Id_cliente);
                oS.PCliente = oC;

                Cuenta_tipoMng oCTMng = new Cuenta_tipoMng();
                Cuenta_tipo    oCT    = new Cuenta_tipo();
                oCT.Id = oC.Id_cuenta_tipo;
                oCTMng.O_Cuenta_tipo = oCT;
                oCTMng.selById();
                oS.PCliente.cuenta_tipo = oCT.Nombre;

                Transporte oT = new Transporte();
                oT.Id          = oS.Id_transporte;
                oT.Nombre      = ddlTransporte.SelectedItem.Text;
                oS.PTransporte = oT;

                Transporte_tipo oTT = new Transporte_tipo();
                oTT.Id             = oS.Id_transporte_tipo;
                oTT.Nombre         = ddlTipo_Transporte.SelectedItem.Text;
                oS.PTransporteTipo = oTT;

                Custodia oCdia = new Custodia();
                oCdia.Id     = oS.Id_custodia;
                oCdia.Nombre = ddlCustodia.SelectedItem.Text;
                oS.PCustodia = oCdia;
            }
            catch
            {
                throw;
            }
            return(oS);
        }