protected void BindByDataRow(DataRow dr, Transporte_condicion_cliente o) { try { int.TryParse(dr["id"].ToString(), out entero); o.Id = entero; entero = 0; if (dr["id_cliente"] != DBNull.Value) { int.TryParse(dr["id_cliente"].ToString(), out entero); o.Id_cliente = entero; entero = 0; } if (dr["id_transporte_condicion"] != DBNull.Value) { int.TryParse(dr["id_transporte_condicion"].ToString(), out entero); o.Id_transporte_condicion = entero; entero = 0; } if (dr["entrada"] != DBNull.Value) { bool.TryParse(dr["entrada"].ToString(), out logica); o.Entrada = logica; logica = false; } if (dr["salida"] != DBNull.Value) { bool.TryParse(dr["salida"].ToString(), out logica); o.Salida = logica; logica = false; } if (dr["orden"] != DBNull.Value) { int.TryParse(dr["orden"].ToString(), out entero); o.Orden = entero; entero = 0; } else { o.Orden = null; } } catch { throw; } }
public override void fillLst() { try { this.comm = GenericDataAccess.CreateCommandSP("sp_Transporte_condicion_cliente"); addParameters(0); this.dt = GenericDataAccess.ExecuteSelectCommand(comm); this._lst = new List <Transporte_condicion_cliente>(); foreach (DataRow dr in dt.Rows) { Transporte_condicion_cliente o = new Transporte_condicion_cliente(); BindByDataRow(dr, o); this._lst.Add(o); } } catch { throw; } }
public static Transporte_condicion_cliente TransCondCliFill(int id_cliente, bool entrada, bool salida) { Transporte_condicion_cliente o = new Transporte_condicion_cliente() { Id_cliente = id_cliente, Entrada = entrada, Salida = salida }; Transporte_condicion_clienteMng oMng = new Transporte_condicion_clienteMng() { O_Transporte_condicion_cliente = o }; try { oMng.fillForOperation(); } catch { throw; } return(o); }
public static int TransCondCliGetNumCond(int id_cliente, bool entrada, bool salida) { int NumCond = 0; Transporte_condicion_cliente o = new Transporte_condicion_cliente() { Id_cliente = id_cliente, Entrada = entrada, Salida = salida }; Transporte_condicion_clienteMng oMng = new Transporte_condicion_clienteMng() { O_Transporte_condicion_cliente = o }; try { NumCond = oMng.GetNumCond(); } catch { throw; } return(NumCond); }
public Transporte_condicion_clienteMng() { this._oTransporte_condicion_cliente = new Transporte_condicion_cliente(); this._lst = new List <Transporte_condicion_cliente>(); }