Beispiel #1
0
 protected void BindByDataRow(DataRow dr, Cliente_comprador o)
 {
     try
     {
         int.TryParse(dr["id"].ToString(), out entero);
         o.Id   = entero;
         entero = 0;
         if (dr["id_cliente_grupo"] != DBNull.Value)
         {
             int.TryParse(dr["id_cliente_grupo"].ToString(), out entero);
             o.Id_cliente_grupo = entero;
             entero             = 0;
         }
         o.Nombre = dr["nombre"].ToString();
         if (dr["IsActive"] != DBNull.Value)
         {
             bool.TryParse(dr["IsActive"].ToString(), out logica);
             o.IsActive = logica;
             logica     = false;
         }
     }
     catch
     {
         throw;
     }
 }
Beispiel #2
0
 public static void Cliente_compradorUdt(Cliente_comprador o)
 {
     try
     {
         Cliente_compradorMng oMng = new Cliente_compradorMng();
         oMng.O_Cliente_comprador = o;
         oMng.udt();
     }
     catch
     {
         throw;
     }
 }
Beispiel #3
0
        public static Cliente_comprador Cliente_compradorGet(int Id)
        {
            Cliente_comprador o = new Cliente_comprador();

            try
            {
                o.Id = Id;
                Cliente_compradorMng oMng = new Cliente_compradorMng();
                oMng.O_Cliente_comprador = o;
                oMng.selById();
            }
            catch
            {
                throw;
            }
            return(o);
        }
Beispiel #4
0
        public static List <Cliente_comprador> Cliente_compradorfillEvenInactive(int IdClienteGrupo)
        {
            List <Cliente_comprador> lst = new List <Cliente_comprador>();

            try
            {
                Cliente_compradorMng oMng = new Cliente_compradorMng();
                Cliente_comprador    o    = new Cliente_comprador();
                o.Id_cliente_grupo       = IdClienteGrupo;
                oMng.O_Cliente_comprador = o;
                oMng.fillEvenInactive();
                lst = oMng.Lst;
            }
            catch
            {
                throw;
            }
            return(lst);
        }
Beispiel #5
0
 public static void Cliente_compradorChangeStatus(Cliente_comprador o, bool status)
 {
     try
     {
         Cliente_compradorMng oMng = new Cliente_compradorMng();
         oMng.O_Cliente_comprador = o;
         if (status)
         {
             oMng.dlt();
         }
         else
         {
             oMng.reactive();
         }
     }
     catch
     {
         throw;
     }
 }
Beispiel #6
0
 public override void fillLst()
 {
     try
     {
         this.comm = GenericDataAccess.CreateCommandSP("sp_Cliente_comprador");
         addParameters(0);
         this.dt   = GenericDataAccess.ExecuteSelectCommand(comm);
         this._lst = new List <Cliente_comprador>();
         foreach (DataRow dr in dt.Rows)
         {
             Cliente_comprador o = new Cliente_comprador();
             BindByDataRow(dr, o);
             this._lst.Add(o);
         }
     }
     catch
     {
         throw;
     }
 }
Beispiel #7
0
 public Cliente_compradorMng()
 {
     this._oCliente_comprador = new Cliente_comprador();
     this._lst = new List <Cliente_comprador>();
 }