protected void BindByDataRow(DataRow dr, Cliente_ejecutivo 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; } if (dr["id_usuario"] != DBNull.Value) { int.TryParse(dr["id_usuario"].ToString(), out entero); o.Id_usuario = entero; entero = 0; } } catch { throw; } }
public override void fillLst() { try { this.comm = GenericDataAccess.CreateCommandSP("sp_Cliente_ejecutivo"); addParameters(0); this.dt = GenericDataAccess.ExecuteSelectCommand(comm); this._lst = new List <Cliente_ejecutivo>(); foreach (DataRow dr in dt.Rows) { Cliente_ejecutivo o = new Cliente_ejecutivo(); BindByDataRow(dr, o); this._lst.Add(o); } } catch { throw; } }
public void fillByCliente() { try { this.comm = GenericDataAccess.CreateCommandSP("sp_Cliente_ejecutivo"); addParameters(5); this.dt = GenericDataAccess.ExecuteSelectCommand(comm); this._lst = new List <Cliente_ejecutivo>(); foreach (DataRow dr in dt.Rows) { Cliente_ejecutivo o = new Cliente_ejecutivo(); BindByDataRow(dr, o); o.Email = dr["email"].ToString(); o.Nombre = dr["nombre"].ToString(); this._lst.Add(o); } } catch { throw; } }
public Cliente_ejecutivoMng() { this._oCliente_ejecutivo = new Cliente_ejecutivo(); this._lst = new List <Cliente_ejecutivo>(); }