コード例 #1
0
 public RsRoutingHead GetRsRoutingHeadById(string Id)
 {
     using (IRsRoutingHeadBLL RsRoutingHeadBLL = BLLContainer.Resolve <IRsRoutingHeadBLL>())
     {
         RsRoutingHead model = RsRoutingHeadBLL.GetFirstOrDefault(Id);
         return(model);
     }
 }
コード例 #2
0
        public int GetRsRoutingHeadCount(string sWhere)
        {
            Expression <Func <RsRoutingHead, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <RsRoutingHead>(sWhere);

            using (IRsRoutingHeadBLL RsRoutingHeadBLL = BLLContainer.Resolve <IRsRoutingHeadBLL>())
            {
                return(RsRoutingHeadBLL.GetCount(whereLamda));
            }
        }
コード例 #3
0
        public List <RsRoutingHead> GetRsRoutingHeads([FromBody] string sWhere)
        {
            Expression <Func <RsRoutingHead, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <RsRoutingHead>(sWhere);

            using (IRsRoutingHeadBLL RsRoutingHeadBLL = BLLContainer.Resolve <IRsRoutingHeadBLL>())
            {
                List <RsRoutingHead> models = RsRoutingHeadBLL.GetModels(whereLamda);
                return(models);
            }
        }
コード例 #4
0
 public bool AddRsRoutingHead(RsRoutingHead mRsRoutingHead)
 {
     if (mRsRoutingHead == null)
     {
         return(false);
     }
     using (IRsRoutingHeadBLL RsRoutingHeadBLL = BLLContainer.Resolve <IRsRoutingHeadBLL>())
     {
         return(RsRoutingHeadBLL.Add(mRsRoutingHead));
     }
 }
コード例 #5
0
 public bool DelRsRoutingHead(string Id)
 {
     using (IRsRoutingHeadBLL RsRoutingHeadBLL = BLLContainer.Resolve <IRsRoutingHeadBLL>())
     {
         try
         {
             RsRoutingHead item = RsRoutingHeadBLL.GetFirstOrDefault(Id);
             return(RsRoutingHeadBLL.Delete(item));
         }
         catch { return(false); }
     }
 }
コード例 #6
0
 public bool DelRsRoutingHeads(string[] Ids)
 {
     using (IRsRoutingHeadBLL RsRoutingHeadBLL = BLLContainer.Resolve <IRsRoutingHeadBLL>())
     {
         try
         {
             List <RsRoutingHead> entitys = new List <RsRoutingHead>();
             foreach (string id in Ids)
             {
                 RsRoutingHead item = RsRoutingHeadBLL.GetFirstOrDefault(id);
                 entitys.Add(item);
             }
             return(RsRoutingHeadBLL.Delete(entitys));
         }
         catch { return(false); }
     }
 }
コード例 #7
0
        public List <RsRoutingHead> GetRsRoutingHeadByPage(int pageSize, int pageIndex, bool isAsc, string orderField, string sWhere)
        {
            string orderStr = "";

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

            using (IRsRoutingHeadBLL RsRoutingHeadBLL = BLLContainer.Resolve <IRsRoutingHeadBLL>())
            {
                List <RsRoutingHead> models = RsRoutingHeadBLL.GetModelsByPage(pageSize, pageIndex, isAsc, orderStr, whereLamda);
                return(models);
            }
        }