Example #1
0
 protected void BindByDataRow(DataRow dr, Cliente_vendor o)
 {
     try
     {
         int.TryParse(dr["id"].ToString(), out entero);
         o.Id        = entero;
         entero      = 0;
         o.Id_fiscal = dr["id_fiscal"].ToString();
         if (dr["id_cliente_grupo"] != DBNull.Value)
         {
             int.TryParse(dr["id_cliente_grupo"].ToString(), out entero);
             o.Id_cliente_grupo = entero;
             entero             = 0;
         }
         o.Codigo    = dr["codigo"].ToString();
         o.Nombre    = dr["nombre"].ToString();
         o.Direccion = dr["direccion"].ToString();
         if (dr["IsActive"] != DBNull.Value)
         {
             bool.TryParse(dr["IsActive"].ToString(), out logica);
             o.IsActive = logica;
             logica     = false;
         }
     }
     catch
     {
         throw;
     }
 }
Example #2
0
 public static void Cliente_vendorUdt(Cliente_vendor o)
 {
     try
     {
         Cliente_vendorMng oMng = new Cliente_vendorMng();
         oMng.O_Cliente_vendor = o;
         oMng.udt();
     }
     catch
     {
         throw;
     }
 }
Example #3
0
        public static Cliente_vendor Cliente_vendorGet(int Id)
        {
            Cliente_vendor o = new Cliente_vendor();

            try
            {
                o.Id = Id;
                Cliente_vendorMng oMng = new Cliente_vendorMng();
                oMng.O_Cliente_vendor = o;
                oMng.selById();
            }
            catch
            {
                throw;
            }
            return(o);
        }
Example #4
0
        public static List <Cliente_vendor> Cliente_vendorfillEvenInactive(int IdClienteGrupo)
        {
            List <Cliente_vendor> lst = new List <Cliente_vendor>();

            try
            {
                Cliente_vendorMng oMng = new Cliente_vendorMng();
                Cliente_vendor    o    = new Cliente_vendor();
                o.Id_cliente_grupo    = IdClienteGrupo;
                oMng.O_Cliente_vendor = o;
                oMng.fillEvenInactive();
                lst = oMng.Lst;
            }
            catch
            {
                throw;
            }
            return(lst);
        }
Example #5
0
        public static List <Cliente_vendor> Cliente_vendorfillByName(string nombre)
        {
            List <Cliente_vendor> lst = new List <Cliente_vendor>();

            try
            {
                Cliente_vendorMng oMng = new Cliente_vendorMng();
                Cliente_vendor    o    = new Cliente_vendor();
                o.Nombre = nombre;
                oMng.O_Cliente_vendor = o;
                oMng.fillLstByName();
                lst = oMng.Lst;
            }
            catch
            {
                throw;
            }
            return(lst);
        }
Example #6
0
 public override void fillLst()
 {
     try
     {
         this.comm = GenericDataAccess.CreateCommandSP("sp_Cliente_vendor");
         addParameters(0);
         this.dt   = GenericDataAccess.ExecuteSelectCommand(comm);
         this._lst = new List <Cliente_vendor>();
         foreach (DataRow dr in dt.Rows)
         {
             Cliente_vendor o = new Cliente_vendor();
             BindByDataRow(dr, o);
             this._lst.Add(o);
         }
     }
     catch
     {
         throw;
     }
 }
Example #7
0
 public static void Cliente_vendorChangeStatus(Cliente_vendor o, bool status)
 {
     try
     {
         Cliente_vendorMng oMng = new Cliente_vendorMng();
         oMng.O_Cliente_vendor = o;
         if (status)
         {
             oMng.dlt();
         }
         else
         {
             oMng.reactive();
         }
     }
     catch
     {
         throw;
     }
 }
Example #8
0
        public static List <Cliente_vendor> Cliente_vendorfillByCliente(int IdClienteGrupo, string vendor = "")
        {
            List <Cliente_vendor> lst = new List <Cliente_vendor>();

            try
            {
                Cliente_vendorMng oMng = new Cliente_vendorMng();
                Cliente_vendor    o    = new Cliente_vendor();
                o.Id_cliente_grupo = IdClienteGrupo;
                if (vendor.Length > 0)
                {
                    o.Codigo = vendor;
                }
                oMng.O_Cliente_vendor = o;
                oMng.fillLstByVendor();
                lst = oMng.Lst;
            }
            catch
            {
                throw;
            }
            return(lst);
        }
Example #9
0
 public Cliente_vendorMng()
 {
     this._oCliente_vendor = new Cliente_vendor();
     this._lst             = new List <Cliente_vendor>();
 }