Exemplo n.º 1
0
 public QmsRoutingCheck GetQmsRoutingCheckById(string Id)
 {
     using (IQmsRoutingCheckBLL QmsRoutingCheckBLL = BLLContainer.Resolve <IQmsRoutingCheckBLL>())
     {
         QmsRoutingCheck model = QmsRoutingCheckBLL.GetFirstOrDefault(Id);
         return(model);
     }
 }
Exemplo n.º 2
0
        public int GetQmsRoutingCheckCount(string sWhere)
        {
            Expression <Func <QmsRoutingCheck, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <QmsRoutingCheck>(sWhere);

            using (IQmsRoutingCheckBLL QmsRoutingCheckBLL = BLLContainer.Resolve <IQmsRoutingCheckBLL>())
            {
                return(QmsRoutingCheckBLL.GetCount(whereLamda));
            }
        }
Exemplo n.º 3
0
        public List <QmsRoutingCheck> GetQmsRoutingChecks([FromBody] string sWhere)
        {
            Expression <Func <QmsRoutingCheck, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <QmsRoutingCheck>(sWhere);

            using (IQmsRoutingCheckBLL QmsRoutingCheckBLL = BLLContainer.Resolve <IQmsRoutingCheckBLL>())
            {
                List <QmsRoutingCheck> models = QmsRoutingCheckBLL.GetModels(whereLamda);
                return(models);
            }
        }
Exemplo n.º 4
0
 public bool AddQmsRoutingCheck(QmsRoutingCheck mQmsRoutingCheck)
 {
     if (mQmsRoutingCheck == null)
     {
         return(false);
     }
     using (IQmsRoutingCheckBLL QmsRoutingCheckBLL = BLLContainer.Resolve <IQmsRoutingCheckBLL>())
     {
         return(QmsRoutingCheckBLL.Add(mQmsRoutingCheck));
     }
 }
Exemplo n.º 5
0
 public bool DelQmsRoutingCheck(string Id)
 {
     using (IQmsRoutingCheckBLL QmsRoutingCheckBLL = BLLContainer.Resolve <IQmsRoutingCheckBLL>())
     {
         try
         {
             QmsRoutingCheck item = QmsRoutingCheckBLL.GetFirstOrDefault(Id);
             return(QmsRoutingCheckBLL.Delete(item));
         }
         catch { return(false); }
     }
 }
Exemplo n.º 6
0
 public bool DelQmsRoutingChecks(string[] Ids)
 {
     using (IQmsRoutingCheckBLL QmsRoutingCheckBLL = BLLContainer.Resolve <IQmsRoutingCheckBLL>())
     {
         try
         {
             List <QmsRoutingCheck> entitys = new List <QmsRoutingCheck>();
             foreach (string id in Ids)
             {
                 QmsRoutingCheck item = QmsRoutingCheckBLL.GetFirstOrDefault(id);
                 entitys.Add(item);
             }
             return(QmsRoutingCheckBLL.Delete(entitys));
         }
         catch { return(false); }
     }
 }
Exemplo n.º 7
0
        public List <QmsRoutingCheck> GetQmsRoutingCheckByPage(int pageSize, int pageIndex, bool isAsc, string orderField, string sWhere)
        {
            string orderStr = "";

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

            using (IQmsRoutingCheckBLL QmsRoutingCheckBLL = BLLContainer.Resolve <IQmsRoutingCheckBLL>())
            {
                List <QmsRoutingCheck> models = QmsRoutingCheckBLL.GetModelsByPage(pageSize, pageIndex, isAsc, orderStr, whereLamda);
                return(models);
            }
        }