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);

                Cliente_grupo oC_g = new Cliente_grupo();
                oC_g.Id = Id;
                Cliente_grupoMng oCMng = new Cliente_grupoMng();

                oCMng.O_Cliente_grupo = oC_g;
                if (status)
                {
                    oCMng.dlt();
                }
                else
                {
                    oCMng.reactive();
                }

                oCMng = new Cliente_grupoMng();
                oCMng.fillAllLst();
                fillCatalog(oCMng.Lst);
            }
            catch (Exception e)
            {
                ((MstCasc)this.Master).setError = e.Message;
            }
        }
Exemple #2
0
        private void fillForm()
        {
            int Id = 0;

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

            try
            {
                Cliente_grupoMng oC_gMng = new Cliente_grupoMng();
                Cliente_grupo    oC_g    = new Cliente_grupo();
                oC_g.Id = Id;
                oC_gMng.O_Cliente_grupo = oC_g;
                oC_gMng.selById();

                txt_nombre.Text           = oC_g.Nombre;
                pnl_configuracion.Visible = true;
                lnkCodigo.NavigateUrl     = "frmClienteCodigo.aspx?Action=Udt&fKey=" + Id.ToString();
                //lnkComprador.NavigateUrl = "frmClienteCompradorLst.aspx?fkey=" + Id.ToString();
                lnkVendor.NavigateUrl    = "frmClienteVendorLst.aspx?fkey=" + Id.ToString();
                lnkMercancia.NavigateUrl = "frmClienteMercanciaLst.aspx?fkey=" + Id.ToString();

                oC_gMng.countCatalog();
                //lnkComprador.Text = "Comprador (" + oC_g.cantComprador.ToString() + ")";
                lnkVendor.Text    = "Vendor (" + oC_g.cantVendor.ToString() + ")";
                lnkMercancia.Text = "Mercancia (" + oC_g.cantMercancia.ToString() + ")";
            }
            catch
            {
                throw;
            }
        }
Exemple #3
0
        public static List <Cliente_grupo> fillClienteGrupo(DropDownList ddlDocumento)
        {
            Cliente_grupoMng oMng = new Cliente_grupoMng();

            oMng.fillLst();
            ddlDocumento.Items.Clear();
            ddlDocumento.DataSource     = oMng.Lst;
            ddlDocumento.DataTextField  = "nombre";
            ddlDocumento.DataValueField = "id";
            ddlDocumento.DataBind();
            return(oMng.Lst);
        }
Exemple #4
0
 private void udtCliente(Cliente_grupo oC)
 {
     try
     {
         Cliente_grupoMng oC_gMng = new Cliente_grupoMng();
         oC_gMng.O_Cliente_grupo = oC;
         oC_gMng.udt();
     }
     catch
     {
         throw;
     }
 }
 protected void Page_Load(object sender, EventArgs args)
 {
     if (!IsPostBack)
     {
         try
         {
             Cliente_grupoMng oCGMng = new Cliente_grupoMng();
             oCGMng.fillAllLst();
             fillCatalog(oCGMng.Lst);
         }
         catch (Exception e)
         {
             ((MstCasc)this.Master).setError = e.Message;
         }
     }
 }
Exemple #6
0
        private void istCliente(Cliente_grupo oC_g)
        {
            try
            {
                Cliente_grupoMng oC_gMng = new Cliente_grupoMng();
                oC_gMng.O_Cliente_grupo = oC_g;
                oC_gMng.add();

                if (oC_g.Id < 1)
                {
                    throw new Exception("Problema en base de datos");
                }
            }
            catch
            {
                throw;
            }
        }