public static void NomUdt(Nom o) { try { NomMng oMng = new NomMng(); oMng.O_Nom = o; oMng.udt(); } catch { throw; } }
public static void NomAdd(Nom o) { try { NomMng oMng = new NomMng(); oMng.O_Nom = o; oMng.add(); } catch { throw; } }
public static Nom NomGet(int Id) { Nom o = new Nom(); try { o.Id = Id; NomMng oMng = new NomMng(); oMng.O_Nom = o; oMng.selById(); } catch { throw; } return(o); }
public override void fillLst() { try { this.comm = GenericDataAccess.CreateCommandSP("sp_Nom"); addParameters(0); this.dt = GenericDataAccess.ExecuteSelectCommand(comm); this._lst = new List<Nom>(); foreach (DataRow dr in dt.Rows) { Nom o = new Nom(); BindByDataRow(dr, o); this._lst.Add(o); } } catch { throw; } }
public static void NomChangeStatus(Nom o, bool status) { try { NomMng oMng = new NomMng(); oMng.O_Nom = o; if (status) { oMng.dlt(); } else { oMng.reactive(); } } catch { throw; } }
protected void BindByDataRow(DataRow dr, Nom o) { try { int.TryParse(dr["id"].ToString(), out entero); o.Id = entero; entero = 0; o.Nombre = dr["nombre"].ToString(); o.Descripcion = dr["descripcion"].ToString(); if (dr["IsActive"] != DBNull.Value) { bool.TryParse(dr["IsActive"].ToString(), out logica); o.IsActive = logica; logica = false; } } catch { throw; } }
public NomMng() { this._oNom = new Nom(); this._lst = new List<Nom>(); }