コード例 #1
0
        public ActionResult AllAuctionMedicine(int? projectid, int? id, string parm, FormCollection collection)
        {
            Dictionary<string, string> sitemaster = GetSiteMaster();
            ViewData["SiteMaster"] = sitemaster;
            if (Int32.Parse(sitemaster["isadmin"]) == 5)
            {
                Dictionary<string, string> dict = ParmHelper.Analysis(collection);
                //如果是刚打开页面
                if (dict.Count == 0 && parm == null)
                {
                    int PageNo = id ?? 1;
                    IList<string> list = EmedAppraiseMapper.Get().QueryForList<string>("AuctionProjectMedicine.ListMedicineCode", projectid.Value);
                    IList<IDictionary> resultlist = new List<IDictionary>();
                    if (list.Count != 0)
                    {
                        Hashtable htparm = new Hashtable();
                        htparm["ids"] = list.ToArray();
                        htparm["start"] = PageSizeList * (id - 1) + 1;   //记录开始数
                        htparm["end"] = id * PageSizeList;    //记录结束数
                        resultlist = StandardDataMapper.Get().QueryForList<IDictionary>("CompareMedicine.ListMedicine", htparm);
                    }
                    ViewData["ProjectDescription"] = new AuctionProjectDao().Find(projectid.Value).NewProjectName;
                    ViewData["Summary"] = new AuctionProjectDao().Find(projectid.Value).NewProjectDescription;
                    ViewData["OID"] = projectid.Value;
                    int count = list.Count;
                    ViewData["Count"] = count;
                    PagedList<IDictionary> plist = new PagedList<IDictionary>(resultlist, PageNo, PageSizeList, count);
                    return View(plist);
                }
                //如果有查询参数了
                if (dict.Count == 0 && parm != null)
                {
                    Dictionary<string, string> use = ParmHelper.AnalysisParm(parm);

                    int PageNo = id ?? 1;
                    IList<string> list = EmedAppraiseMapper.Get().QueryForList<string>("AuctionProjectMedicine.ListMedicineCode", projectid.Value);
                    Hashtable htparm = new Hashtable();
                    htparm["ids"] = list.ToArray();
                    htparm["name"] = use["CommonName"];
                    htparm["start"] = PageSizeList * (id - 1) + 1;   //记录开始数
                    htparm["end"] = id * PageSizeList;    //记录结束数
                    IList<IDictionary> resultlist =EmedEvaluationBaseMapper.Get().QueryForList<IDictionary>("ChineseAndImportMed.ListMedicine", htparm);
                    ViewData["ProjectDescription"] = new AuctionProjectDao().Find(projectid.Value).NewProjectName;
                    ViewData["Summary"] = new AuctionProjectDao().Find(projectid.Value).NewProjectDescription;
                    ViewData["OID"] = projectid.Value;
                    ViewData["Form"] = use;
                    int count = list.Count;
                    PagedList<IDictionary> plist = new PagedList<IDictionary>(resultlist, PageNo, PageSizeList, count);
                    return View(plist);

                }
                else
                {   //把表单转为参数
                    if (dict.Count != 0)
                    {
                        string parmeter = ParmHelper.BuildParm(dict);
                        return RedirectToAction("AllProjectMedicine", new { id = 1, parm = parmeter });
                    }
                }
            }
            else
                return RedirectToAction("MemberLevelError", "Base");
            return View();
        }
コード例 #2
0
        public JsonResult ListProjectLevelGroupAuction(string projectid)
        {
            IList<QualityGroup> list = new QualityGroupDao().FindByProjectOid(Int32.Parse(projectid));
            string strlist = string.Empty;
            string projectname = new AuctionProjectDao().Find(Int32.Parse(projectid)).ProjectName;
            foreach (QualityGroup p in list)
            {
                strlist += "<tr class='content tr_bg'>";
                strlist += "<td align='center'><input type='checkbox' class='levelgroupeachone'><input type='hidden' class='hidlevelgroupID' value='" + p.ID + "'</td>";
                strlist += "<td>" + p.BigLevel + "</td>";
                strlist += "<td>" + p.SmallLevel + "</td>";
                strlist += "<td>" + projectname + "</td>";
                strlist += "</tr>";

            }
            return Json(strlist);
        }
コード例 #3
0
        public JsonResult ListProjectRuleGroupAuction(string projectid)
        {
            string strlist = string.Empty;
            if (projectid != "0")
            {
                IList<AuctionRule> list = new AuctionRuleDao().FindByProjectOid(Int32.Parse(projectid));
                string projectname = new AuctionProjectDao().Find(Int32.Parse(projectid)).ProjectName;
                foreach (AuctionRule p in list)
                {
                    strlist += "<tr class='content tr_bg'>";
                    strlist += "<td align='center'><input type='checkbox' class='ruleeachone'><input type='hidden' class='hidrulegroupID' value='" + p.ID + "'</td>";
                    strlist += "<td>" + p.Total + "</td>";
                    strlist += "<td>" + p.Rest + "</td>";
                    strlist += "<td>" + projectname + "</td>";
                    strlist += "</tr>";

                }
            }
            return Json(strlist);
        }
コード例 #4
0
        public JsonResult ListProjectForAuction()
        {
            IList<AuctionProject> list = new AuctionProjectDao().FindAll();
            string strlist = string.Empty;
            string sellist = "<option value='0'>无</option>";
            foreach (AuctionProject p in list)
            {
                strlist += "<tr class='content tr_bg'>";
                strlist += "<td align='center'><input type='checkbox' class='projecteachone'><input type='hidden' class='hidID' value='" + p.OID + "'</td>";
                strlist += "<td>" + p.NewProjectName + "</td>";
                strlist += "<td>" + new CityCodeDao().Find(Int32.Parse(p.ProvinceNo)).Name + "</td>";
                strlist += "<td>" + p.AnnounceDate + "</td>";
                strlist += "</tr>";

                sellist += "<option value='" + p.OID + "'>" + p.NewProjectName + "</option>";
            }
            return Json(new { table = strlist, select = sellist });
        }