public List <torquechecktarget> SelectByDate(DateTime first, DateTime last, string wrenchID)
        {
            //DateTime start=dt;
            //DateTime last=dt.AddDays (1).AddMilliseconds (-1);
            string condition = string.Format("checkDate>='{0}' and checkDate<='{1}' and wrenchID_id='{2}'", first, last, wrenchID);

            return(ServerHelp.findDataByCondition <torquechecktarget>(condition, _webip));
        }
Exemplo n.º 2
0
 public Model.wrench selectByBarcode(string barcode)
 {
     try
     {
         string contion = string.Format("wrenchBarCode='{0}'", barcode);
         return(ServerHelp.findDataByCondition <wrench>(contion, _webip).FirstOrDefault());
     }
     catch { return(new wrench()); }
 }
Exemplo n.º 3
0
        public List <wrench> selectByContion(Dictionary <string, string> dict)
        {
            string str = "";

            foreach (var d in dict)
            {
                str += (string.Format("{0}='{1}'" + " and ", d.Key, d.Value));
            }
            string contion = str.Count() > 4? str.Remove(str.Count() - 4):"";

            return(ServerHelp.findDataByCondition <wrench>(contion, _webip));
        }
Exemplo n.º 4
0
        public duties SelectByGuid(string guid)
        {
            string        contion = string.Format("guid='{0}'", guid);
            List <duties> duty    = new List <duties>();

            duty = ServerHelp.findDataByCondition <duties>(contion, _webip);
            if (duty.Count > 0)
            {
                return(duty.FirstOrDefault());
            }
            return(new duties());
        }
Exemplo n.º 5
0
        public List <borrow> SelectByCondition(Dictionary <string, string> condition)
        {
            string tablename = typeof(borrow).Name;
            string str       = "";

            foreach (var d in condition)
            {
                str += string.Format("{0}='{1}'" + " and ", d.Key, d.Value);
            }
            string scontion = str.Count() > 4 ? str.Remove(str.Count() - 4) : "";

            return(ServerHelp.findDataByCondition <borrow>(scontion, _webip));
        }
        public List <torquechecktarget> SelectByContion(Dictionary <string, string> dict, int pagesize, int pageno)
        {
            string temp = "";

            foreach (var d in dict)
            {
                if (d.Key == "starttime")
                {
                    temp += string.Format("checkDate>='{0}' and ", d.Value);
                    continue;
                }
                if (d.Key == "endtime")
                {
                    temp += string.Format("checkDate<'{0}' and ", d.Value);
                    continue;
                }
                temp += string.Format("{0}='{1}' and ", d.Key, d.Value);
            }
            string contion = temp.Count() > 4 ? temp.Remove(temp.Count() - 4) : "";

            contion += string.Format("LIMIT {0},{1}", (pageno * pagesize), pagesize);
            return(ServerHelp.findDataByCondition <torquechecktarget>(contion, _webip));
        }
Exemplo n.º 7
0
        public List <wrench> SelectBarorcode(string contion)
        {
            string condition = string.Format("wrenchBarCode='{0}' or wrenchCode='{1}'", contion, contion);

            return(ServerHelp.findDataByCondition <wrench>(condition, _webip));
        }
Exemplo n.º 8
0
        public List <borrow> SelectByWrench(string wrench, string user, bool isreturn = true)
        {
            string contion = string.Format("WrenchID_id='{0}' and is_return={1} and borrowUser='******'", wrench, isreturn, user);

            return(ServerHelp.findDataByCondition <borrow>(contion, _webip));
        }
Exemplo n.º 9
0
        public List <borrow> SelectByUser(string user, bool isreturn = true)
        {
            string contion = string.Format("borrowUser='******' and is_return={1}", user, isreturn);

            return(ServerHelp.findDataByCondition <borrow>(contion, _webip));
        }
Exemplo n.º 10
0
        public List <borrow> SelectWrenchOrBUser(string stime, string etime)
        {
            string contion = string.Format(" (borrowDate>='{0}' and borrowDate<='{1}')", stime, etime);

            return(ServerHelp.findDataByCondition <borrow>(contion, _webip));
        }
Exemplo n.º 11
0
        public wrenchstatus selectByStatusDM(string statusDM)
        {
            string contion = string.Format("statusDM='{0}'", statusDM);

            return(ServerHelp.findDataByCondition <wrenchstatus>(contion, _webip).FirstOrDefault());
        }
Exemplo n.º 12
0
        public role SelectById(string id)
        {
            string contion = string.Format("id='{0}'", id);

            return(ServerHelp.findDataByCondition <role>(contion, _webip).FirstOrDefault());
        }
Exemplo n.º 13
0
        /// <summary>
        /// SelectBySysGuid 根据项目的id
        /// </summary>
        /// <param name="guid"></param>
        /// <returns></returns>
        public List <role> SelectBySysGuid(string guid)
        {
            string condition = string.Format("system_id='{0}'", guid);

            return(ServerHelp.findDataByCondition <role>(condition, _webip));
        }
Exemplo n.º 14
0
        public wrenchspecies selectByGuid(string guid)
        {
            string contion = string.Format("guid='{0}'", guid);

            return(ServerHelp.findDataByCondition <wrenchspecies>(contion, _webip).FirstOrDefault());
        }
Exemplo n.º 15
0
        public List <borrow> SelectWrenchOrBUser(string stime, string etime, string guid, bool?isreturn = false)
        {
            string contion = string.Format(" (is_return={0} and borrowDate>='{1}' and borrowDate<='{2}') and (WrenchID_id='{3}' or borrowUser='******')", isreturn ?? false, stime, etime, guid, guid);

            return(ServerHelp.findDataByCondition <borrow>(contion, _webip));
        }
Exemplo n.º 16
0
        public List <borrow> SelectByUser(string user)
        {
            string contion = string.Format("borrowUser='******'", user);

            return(ServerHelp.findDataByCondition <borrow>(contion, _webip));
        }
Exemplo n.º 17
0
        public Model.torquechecktarget SelectByGuid(string guid)
        {
            string contion = string.Format("guid='{0}'", guid);

            return(ServerHelp.findDataByCondition <torquechecktarget>(contion, _webip).FirstOrDefault());
        }
Exemplo n.º 18
0
        public List <Model.wrench> selectByid(int id)
        {
            string contion = string.Format("wrenchCode='{0}'", id);

            return(ServerHelp.findDataByCondition <wrench>(contion, _webip));
        }
Exemplo n.º 19
0
        public List <torquechecktarget> SelectByWrench(string wrenchguid)
        {
            string condition = string.Format("wrenchID_id='{0}'", wrenchguid);

            return(ServerHelp.findDataByCondition <torquechecktarget>(condition, _webip));
        }
Exemplo n.º 20
0
        public List <wrench> selectPage(int page, int pageNo)
        {
            string condition = string.Format(" id <=(SELECT id FROM wrench ORDER BY id desc LIMIT {0}, {1}) ORDER BY id desc LIMIT {2}", (pageNo - 1) * page, 1, page);

            return(ServerHelp.findDataByCondition <wrench>(condition, _webip));
        }
Exemplo n.º 21
0
        public List <borrow> SelectByWrench(string wrench)
        {
            string contion = string.Format("WrenchID_id='{0}'", wrench);

            return(ServerHelp.findDataByCondition <borrow>(contion, _webip));
        }
Exemplo n.º 22
0
        public List <Model.department> Select(string name, bool delflag = false)
        {
            string contion = string.Format("departmentName='{0}' and parentDepartment='{1}'", name, delflag);

            return(ServerHelp.findDataByCondition <Model.department>(contion, _webIp));
        }
Exemplo n.º 23
0
        public List <wrenchspecies> selectbyname(string name)
        {
            string contion = string.Format("speciesName='{0}'", name);

            return(ServerHelp.findDataByCondition <wrenchspecies>(contion, _webip));
        }
Exemplo n.º 24
0
        public Model.department SelectByGuid(string guid)
        {
            string contion = string.Format("guid='{0}'", guid);

            return(ServerHelp.findDataByCondition <Model.department>(contion, _webIp).FirstOrDefault());
        }
Exemplo n.º 25
0
        public List <Model.systemcheckset> selectBySystemname(string systemname)
        {
            string contion = string.Format("systemname='{0}'", systemname);

            return(ServerHelp.findDataByCondition <systemcheckset>(contion, _webip));
        }
Exemplo n.º 26
0
        public List <department> SelectByDelFlag(string parentid = "", bool delflag = false)
        {
            string contion = string.Format("delDepartment={0} and parentDepartment='{1}'", delflag, parentid);

            return(ServerHelp.findDataByCondition <Model.department>(contion, _webIp));
        }
Exemplo n.º 27
0
        public role SelectByGuid(string guid)
        {
            string condition = string.Format("guid='{0}'", guid);

            return(ServerHelp.findDataByCondition <Model.role>(condition, _webip).FirstOrDefault());
        }
Exemplo n.º 28
0
        public List <department> SelectByFlag(bool flag = false)
        {
            string contion = string.Format("delDepartment={0}", flag);

            return(ServerHelp.findDataByCondition <Model.department>(contion, _webIp));
        }
Exemplo n.º 29
0
        public List <role> selectSysidandguid(string systemid, string guid)
        {
            string condition = string.Format("guid='{0}' and system_id='{1}'", guid, systemid);

            return(ServerHelp.findDataByCondition <role>(condition, _webip));
        }
Exemplo n.º 30
0
        public List <Model.errorrangset> selectByspeciesid(string guid)
        {
            string contion = string.Format("speciesID_id='{0}'", guid);

            return(ServerHelp.findDataByCondition <errorrangset>(contion, _webip));
        }