public List <Exception> Eliminar(string[] ids) { List <Exception> list = new List <Exception>(); if (ids != null && ids.Length > 0) { foreach (string id in ids) { Entities.FwkModulos item = new Entities.FwkModulos(true); item.FwkAplicaciones.ClaAplicacion = Utils.IsNull(id, 0); item.ClaModulo = Utils.IsNull(id, 0); try { this.Data.Delete(item); } catch (Exception ex) { list.Add(ex); } } } return(list); }
public List <Entities.FwkModulos> ListarFwkModulos(InglesIndividual.Entities.JQXGridSettings settings, int claAplicacion, int ClaModulo, string nomModulo, int claModuloPadre) { List <Entities.FwkModulos> list = new List <Entities.FwkModulos>(); DataEntities.SpFwkModulosGrd sp = new DataEntities.SpFwkModulosGrd(); sp.ClaAplicaion = claAplicacion; sp.ClaModulo = ClaModulo; sp.NomModulo = nomModulo; sp.ClaModuloPadre = claModuloPadre; this.ConfigurePagedStoredProcedure(sp, settings); DataTable dt = sp.GetDataTable(this.ConnectionString); foreach (DataRow dr in dt.Rows) { Entities.FwkModulos item = new Entities.FwkModulos(true); item.FwkAplicaciones = new Entities.FwkAplicaciones(); item.FwkAplicaciones.ClaAplicacion = Utils.GetDataRowValue(dr, "ClaAplicacion", 0); item.ClaModulo = Utils.GetDataRowValue(dr, "ClaModulo", 0); item.NomModulo = Utils.GetDataRowValue(dr, "NomModulo", ""); item.ClaModuloPadre = Utils.GetDataRowValue(dr, "ClaModuloPadre", 0); this.SetWebEntityGridValues(item, dr); list.Add(item); } return(list); }
public override int Delete(Entity entity, DataTransaction tran) { Entities.FwkModulos item = entity as Entities.FwkModulos; DataEntities.SpFwkModulosDel sp = new DataEntities.SpFwkModulosDel(); sp.ClaAplicaion = item.FwkAplicaciones.ClaAplicacion; sp.ClaModulo = item.ClaModulo; if (tran != null) { return(sp.ExecuteNonQuery(tran)); } else { return(sp.ExecuteNonQuery(this.ConnectionString)); } }