Exemplo n.º 1
0
        public ActionResult Index()
        {
            ViewData["account"] = sessionService.GetAccount();
            string nowYear   = DateTime.Now.ToLocalTime().ToString("yyyy");
            string command   = string.Format("select * from Exemplar where SealedTime like '%{0}%' and Status = '4';", nowYear);
            var    exemplars = server.Find2SQL(command);

            return(View(exemplars));
        }
Exemplo n.º 2
0
        // 查询
        public ActionResult Find1(string fclosetime, string fwlno, string fwlname,
                                  string fwllclass, string fsup, string fver, string fvertime, string fstatus)
        {
            string command = string.Format("select * from Exemplar where SealedTime like '%{0}%' and Code like '%{1}%' and MaterialName like '%{2}%' and MaterialClass like '%{3}%' and Supplier like '%{4}%' and ValidTime like '%{5}%' and SignDate like '%{6}%' and ExemStatus like '%{7}%' and Status = '0';",
                                           fclosetime, fwlno, fwlname, fwllclass, fsup, fver, fvertime, fstatus);
            var exemplars = exemplarServer.Find2SQL(command);

            return(View("BackHist", exemplars));
        }
        // 查找
        public ActionResult Find(string fclosetime, string fwlno, string fwlname,
                                 string fwllclass, string fsup, string fver, string fvertime)
        {
            string command = string.Format("select * from Exemplar where SealedTime like '%{0}%' and Code like '%{1}%' and MaterialName like '%{2}%' and MaterialClass like '%{3}%' and Supplier like '%{4}%' and ValidTime like '%{5}%' and SignDate like '%{6}%' and Status = '4';",
                                           fclosetime, fwlno, fwlname, fwllclass, fsup, fver, fvertime);
            var _exemplars = server.Find2SQL(command);
            var exemplars  = from exe in _exemplars
                             where exe.ExemStatus == "超期"
                             select exe;

            return(View("Index", exemplars));
        }