public static void Tipo_cargaUdt(Tipo_carga o) { try { Tipo_cargaMng oMng = new Tipo_cargaMng(); oMng.O_Tipo_carga = o; oMng.udt(); } catch { throw; } }
public static Tipo_carga Tipo_cargaGet(int Id) { Tipo_carga o = new Tipo_carga(); try { o.Id = Id; Tipo_cargaMng oMng = new Tipo_cargaMng(); oMng.O_Tipo_carga = o; oMng.selById(); } catch { throw; } return(o); }
public override void fillLst() { try { this.comm = GenericDataAccess.CreateCommandSP("sp_Tipo_carga"); addParameters(0); this.dt = GenericDataAccess.ExecuteSelectCommand(comm); this._lst = new List <Tipo_carga>(); foreach (DataRow dr in dt.Rows) { Tipo_carga o = new Tipo_carga(); BindByDataRow(dr, o); this._lst.Add(o); } } catch { throw; } }
protected void BindByDataRow(DataRow dr, Tipo_carga o) { try { int.TryParse(dr["id"].ToString(), out entero); o.Id = 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; } }
public static void Tipo_cargaChangeStatus(Tipo_carga o, bool status) { try { Tipo_cargaMng oMng = new Tipo_cargaMng(); oMng.O_Tipo_carga = o; if (status) { oMng.dlt(); } else { oMng.reactive(); } } catch { throw; } }
public Tipo_cargaMng() { this._oTipo_carga = new Tipo_carga(); this._lst = new List <Tipo_carga>(); }