Exemple #1
0
        /// <summary>
        /// 显示详情页
        /// </summary>
        /// <param name="EditType">编辑类型</param>
        /// <returns>返回编辑结果</returns>
        public ActionResult ExpePlanEdit(E_tb_ExpePlan eExpePlan, string EditType, int?InfoID)
        {
            ViewData["PlanTypeList"]  = this.GetPlanTypeList(false);
            ViewData["ProjectList"]   = PageTools.GetSelectList(tProject.GetList("").Tables[0], "ProjectID", "ProjectName", false);
            ViewData["PersonnelList"] = PageTools.GetSelectList(tInPersonnel.GetList(" AreaID=" + CurrentUserInfo.AreaID.ToString()).Tables[0], "PersonnelID", "PersonnelName", false);

            //ViewData["SampleList"] = PageTools.GetSelectList(tSample.GetList(" (handleUser='' or handleUser is null) order by id ").Tables[0], "id", "name", false);
            ViewBag.PersonnelID = CurrentUserInfo.PersonnelID;
            ViewBag.AreaAddr    = tArea.GetModel(int.Parse(CurrentUserInfo.AreaID.ToString())).AreaName;
            ViewBag.SampleID    = 0;
            ViewBag.ProjectID   = 0;
            if (EditType == "Edit")
            {
                eExpePlan         = tExpePlan.GetModel(Convert.ToInt32(InfoID));
                ViewBag.SampleID  = eExpePlan.SampleID;
                ViewBag.ProjectID = eExpePlan.ProjectID;
            }

            //默认获取前200条数据,避免因option过多导致加载过慢
            List <tb_Sample> SampleList = _dSample.GetModelList(400, "id,name", " where handleUser=0", eExpePlan.SampleID != null ? Convert.ToInt32(eExpePlan.SampleID) : 0);

            ViewData["SampleList"] = SampleList;

            eExpePlan.EditType = EditType;
            return(View(eExpePlan));
        }
Exemple #2
0
 /// <summary>
 /// 显示详情页
 /// </summary>
 /// <param name="EditType">编辑类型</param>
 /// <returns>返回编辑结果</returns>
 public ActionResult ExpePlanEdit(E_tb_ExpePlan eExpePlan, string EditType, int?InfoID)
 {
     ViewData["PlanTypeList"]  = this.GetPlanTypeList(false);
     ViewData["ProjectList"]   = PageTools.GetSelectList(tProject.GetList("").Tables[0], "ProjectID", "ProjectName", false);
     ViewData["PersonnelList"] = PageTools.GetSelectList(tInPersonnel.GetList(" AreaID=" + CurrentUserInfo.AreaID.ToString()).Tables[0], "PersonnelID", "PersonnelName", false);
     ViewData["SampleList"]    = PageTools.GetSelectList(tSample.GetList(" handleUser='' order by id ").Tables[0], "id", "name", false);
     ViewBag.PersonnelID       = CurrentUserInfo.PersonnelID;
     ViewBag.AreaAddr          = tArea.GetModel(int.Parse(CurrentUserInfo.AreaID.ToString())).AreaName;
     ViewBag.SampleID          = 0;
     ViewBag.ProjectID         = 0;
     if (EditType == "Edit")
     {
         eExpePlan         = tExpePlan.GetModel(Convert.ToInt32(InfoID));
         ViewBag.SampleID  = eExpePlan.SampleID;
         ViewBag.ProjectID = eExpePlan.ProjectID;
     }
     eExpePlan.EditType = EditType;
     return(View(eExpePlan));
 }