Beispiel #1
0
        public static List <Cliente_copia> ClienteCopiaOperacionLst(int id_operacion, int id_cliente)
        {
            List <Cliente_copia> lst = new List <Cliente_copia>();

            try
            {
                Cliente_copia_operacionMng oCCOMng = new Cliente_copia_operacionMng();
                Cliente_copia_operacion    oCCO    = new Cliente_copia_operacion()
                {
                    Id_operacion = id_operacion, Id_cliente = id_cliente
                };
                oCCOMng.O_Cliente_copia_operacion = oCCO;
                oCCOMng.fillLstByCliente_operacion();
                List <Cliente_copia_operacion> lstCCO = oCCOMng.Lst;

                Cliente_copiaMng oCCMng = new Cliente_copiaMng();
                foreach (Cliente_copia_operacion itemCCO in lstCCO)
                {
                    Cliente_copia oCC = new Cliente_copia()
                    {
                        Id = itemCCO.Id_cliente_copia
                    };
                    oCCMng.O_Cliente_copia = oCC;
                    oCCMng.selById();
                    lst.Add(oCC);
                }
            }
            catch
            {
                throw;
            }
            return(lst);
        }
 protected void BindByDataRow(DataRow dr, Cliente_copia o)
 {
     try
     {
         int.TryParse(dr["id"].ToString(), out entero);
         o.Id     = entero;
         entero   = 0;
         o.Nombre = dr["nombre"].ToString();
     }
     catch
     {
         throw;
     }
 }
 public override void fillLst()
 {
     try
     {
         this.comm = GenericDataAccess.CreateCommandSP("sp_Cliente_copia");
         addParameters(0);
         this.dt   = GenericDataAccess.ExecuteSelectCommand(comm);
         this._lst = new List <Cliente_copia>();
         foreach (DataRow dr in dt.Rows)
         {
             Cliente_copia o = new Cliente_copia();
             BindByDataRow(dr, o);
             this._lst.Add(o);
         }
     }
     catch
     {
         throw;
     }
 }
 public Cliente_copiaMng()
 {
     this._oCliente_copia = new Cliente_copia();
     this._lst            = new List <Cliente_copia>();
 }