public RsEquipMaster GetRsEquipMasterById(string Id) { using (IRsEquipMasterBLL RsEquipMasterBLL = BLLContainer.Resolve <IRsEquipMasterBLL>()) { RsEquipMaster model = RsEquipMasterBLL.GetFirstOrDefault(Id); return(model); } }
public int GetRsEquipMasterCount(string sWhere) { Expression <Func <RsEquipMaster, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <RsEquipMaster>(sWhere); using (IRsEquipMasterBLL RsEquipMasterBLL = BLLContainer.Resolve <IRsEquipMasterBLL>()) { return(RsEquipMasterBLL.GetCount(whereLamda)); } }
public List <RsEquipMaster> GetRsEquipMasters([FromBody] string sWhere) { Expression <Func <RsEquipMaster, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <RsEquipMaster>(sWhere); using (IRsEquipMasterBLL RsEquipMasterBLL = BLLContainer.Resolve <IRsEquipMasterBLL>()) { List <RsEquipMaster> models = RsEquipMasterBLL.GetModels(whereLamda); return(models); } }
public bool AddRsEquipMaster(RsEquipMaster mRsEquipMaster) { if (mRsEquipMaster == null) { return(false); } using (IRsEquipMasterBLL RsEquipMasterBLL = BLLContainer.Resolve <IRsEquipMasterBLL>()) { return(RsEquipMasterBLL.Add(mRsEquipMaster)); } }
public bool DelRsEquipMaster(string Id) { using (IRsEquipMasterBLL RsEquipMasterBLL = BLLContainer.Resolve <IRsEquipMasterBLL>()) { try { RsEquipMaster item = RsEquipMasterBLL.GetFirstOrDefault(Id); return(RsEquipMasterBLL.Delete(item)); } catch { return(false); } } }
public bool DelRsEquipMasters(string[] Ids) { using (IRsEquipMasterBLL RsEquipMasterBLL = BLLContainer.Resolve <IRsEquipMasterBLL>()) { try { List <RsEquipMaster> entitys = new List <RsEquipMaster>(); foreach (string id in Ids) { RsEquipMaster item = RsEquipMasterBLL.GetFirstOrDefault(id); entitys.Add(item); } return(RsEquipMasterBLL.Delete(entitys)); } catch { return(false); } } }
public List <RsEquipMaster> GetRsEquipMasterByPage(int pageSize, int pageIndex, bool isAsc, string orderField, string sWhere) { string orderStr = ""; if (string.IsNullOrEmpty(orderField)) { orderStr = "CREATION_DATE"; } else { orderStr = orderField; } Expression <Func <RsEquipMaster, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <RsEquipMaster>(sWhere); using (IRsEquipMasterBLL RsEquipMasterBLL = BLLContainer.Resolve <IRsEquipMasterBLL>()) { List <RsEquipMaster> models = RsEquipMasterBLL.GetModelsByPage(pageSize, pageIndex, isAsc, orderStr, whereLamda); return(models); } }