示例#1
0
 public RsMaintainStandardsRelate GetRsMaintainStandardsRelateById(string Id)
 {
     using (IRsMaintainStandardsRelateBLL RsMaintainStandardsRelateBLL = BLLContainer.Resolve <IRsMaintainStandardsRelateBLL>())
     {
         RsMaintainStandardsRelate model = RsMaintainStandardsRelateBLL.GetFirstOrDefault(Id);
         return(model);
     }
 }
示例#2
0
        public int GetRsMaintainStandardsRelateCount(string sWhere)
        {
            Expression <Func <RsMaintainStandardsRelate, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <RsMaintainStandardsRelate>(sWhere);

            using (IRsMaintainStandardsRelateBLL RsMaintainStandardsRelateBLL = BLLContainer.Resolve <IRsMaintainStandardsRelateBLL>())
            {
                return(RsMaintainStandardsRelateBLL.GetCount(whereLamda));
            }
        }
示例#3
0
        public List <RsMaintainStandardsRelate> GetRsMaintainStandardsRelates([FromBody] string sWhere)
        {
            Expression <Func <RsMaintainStandardsRelate, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <RsMaintainStandardsRelate>(sWhere);

            using (IRsMaintainStandardsRelateBLL RsMaintainStandardsRelateBLL = BLLContainer.Resolve <IRsMaintainStandardsRelateBLL>())
            {
                List <RsMaintainStandardsRelate> models = RsMaintainStandardsRelateBLL.GetModels(whereLamda);
                return(models);
            }
        }
示例#4
0
 public bool AddRsMaintainStandardsRelate(RsMaintainStandardsRelate mRsMaintainStandardsRelate)
 {
     if (mRsMaintainStandardsRelate == null)
     {
         return(false);
     }
     using (IRsMaintainStandardsRelateBLL RsMaintainStandardsRelateBLL = BLLContainer.Resolve <IRsMaintainStandardsRelateBLL>())
     {
         return(RsMaintainStandardsRelateBLL.Add(mRsMaintainStandardsRelate));
     }
 }
示例#5
0
 public bool DelRsMaintainStandardsRelate(string Id)
 {
     using (IRsMaintainStandardsRelateBLL RsMaintainStandardsRelateBLL = BLLContainer.Resolve <IRsMaintainStandardsRelateBLL>())
     {
         try
         {
             RsMaintainStandardsRelate item = RsMaintainStandardsRelateBLL.GetFirstOrDefault(Id);
             return(RsMaintainStandardsRelateBLL.Delete(item));
         }
         catch { return(false); }
     }
 }
示例#6
0
 public bool DelRsMaintainStandardsRelates(string[] Ids)
 {
     using (IRsMaintainStandardsRelateBLL RsMaintainStandardsRelateBLL = BLLContainer.Resolve <IRsMaintainStandardsRelateBLL>())
     {
         try
         {
             List <RsMaintainStandardsRelate> entitys = new List <RsMaintainStandardsRelate>();
             foreach (string id in Ids)
             {
                 RsMaintainStandardsRelate item = RsMaintainStandardsRelateBLL.GetFirstOrDefault(id);
                 entitys.Add(item);
             }
             return(RsMaintainStandardsRelateBLL.Delete(entitys));
         }
         catch { return(false); }
     }
 }
示例#7
0
        public List <RsMaintainStandardsRelate> GetRsMaintainStandardsRelateByPage(int pageSize, int pageIndex, bool isAsc, string orderField, string sWhere)
        {
            string orderStr = "";

            if (string.IsNullOrEmpty(orderField))
            {
                orderStr = "CREATION_DATE";
            }
            else
            {
                orderStr = orderField;
            }
            Expression <Func <RsMaintainStandardsRelate, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <RsMaintainStandardsRelate>(sWhere);

            using (IRsMaintainStandardsRelateBLL RsMaintainStandardsRelateBLL = BLLContainer.Resolve <IRsMaintainStandardsRelateBLL>())
            {
                List <RsMaintainStandardsRelate> models = RsMaintainStandardsRelateBLL.GetModelsByPage(pageSize, pageIndex, isAsc, orderStr, whereLamda);
                return(models);
            }
        }