public ActionResult DepartmentBaseEdit()
 {
     ViewData["IsHasFunRole"] = Rolemanager.IsHasFunRole(EmployeeBase.e_ID, "001006001");//是否拥有管理的权限
     Model.DepartmentBase model = new Model.DepartmentBase();
     this.ViewData["texOtype"] = RequestBase.GetString("otype");
     BindControl bc = new BindControl();
     ViewData["Guoji"] = bc.BindSysCodeBase("0002", 2, true, true);
     ViewData["c_name"] = "";//暂时无用 2014-8-29
     switch (RequestBase.GetString("otype"))
     {
         case "modify":
             Guid id = new Guid(RequestBase.GetString("dli_id").Split('|')[0]);
             model = dBLL.GetModel(id);
             //ViewData["c_id"] = model.cs_ID;
             //ViewData["c_name"] = new EnergyBLL.CollegeSchoolBase().GetModel(model.cs_ID).cs_MingCh;
             return View(model);
         case "details":
             Guid id1 = new Guid(RequestBase.GetString("dli_id").Split('|')[0]);
             model = dBLL.GetModel(id1);
             //ViewData["c_id"] = model.cs_ID;
             //ViewData["c_name"] = new EnergyBLL.CollegeSchoolBase().GetModel(model.cs_ID).cs_MingCh;
             return View(model);
         default:
             this.ViewData["pid"] = RequestBase.GetString("pid");
             //if (RequestBase.GetString("pid") != "00000000-0000-0000-0000-000000000000")
             //{
             //    model = dBLL.GetModel(new Guid(RequestBase.GetString("pid")));
             //    //ViewData["c_id"] = model.cs_ID;
             //    //ViewData["c_name"] = new EnergyBLL.CollegeSchoolBase().GetModel(model.cs_ID).cs_MingCh;
             //}
             this.ViewData["hfcengj"] = RequestBase.GetString("cengj");
             this.ViewData["hfbianm"] = RequestBase.GetString("bianm");
             return View();
     }
 }
 public ActionResult EmployeeEdit()
 {
     BindTypeDLL();
     //ViewData["LeiB"] = new BindControl().BindSysCodeBase("0006", 2, false, false);
     ViewData["LeiB"] = new BindControl().BindSysCodeBaseForCheckBoxList("0006", 2, false);
     this.ViewData["hfOtype"] = RequestBase.GetString("otype");
     ViewData["IsHasFunRole"] = _roleManager.IsHasFunRole(EmployeeBase.e_ID, "001002001"); //是否拥有管理的权限
     if (RequestBase.GetString("type") == "details")
     {
         ViewData["EmployeeBaseEdit_Type"] = "false";
     }
     if (!string.IsNullOrEmpty(RequestBase.GetString("d_ID")))
     {
         this.ViewData["o_ID"] = RequestBase.GetString("d_ID");
         this.ViewData["departId"] = RequestBase.GetString("d_ID");
         this.ViewData["departname"] = _departmentBase.GetModel(new Guid(RequestBase.GetString("d_ID"))).d_MingCh;
     }
     switch (ViewData["hfOtype"].ToString())
     {
         case "modify":
             ViewData["hfEid"] = RequestBase.GetString("e_ID");
             EmployeeBaseObj = _employeeBase.GetModel(new Guid(RequestBase.GetString("e_ID")));
             //ViewData["LeiBValue"] = EmployeeLeibBaseBLL.GetFunctionCodes(new Guid(RequestBase.GetString("e_ID")));
             break;
         case "details":
             ViewData["hfEid"] = RequestBase.GetString("e_ID");
             EmployeeBaseObj = _employeeBase.GetModel(new Guid(RequestBase.GetString("e_ID")));
             //ViewData["LeiBValue"] = EmployeeLeibBaseBLL.GetFunctionCodes(new Guid(RequestBase.GetString("e_ID")));
             break;
         default:
             EmployeeBaseObj = new webs_YueyxShop.Model.EmployeeBase(); //添加时,set值
             break;
     }
     return View();
 }
예제 #3
0
 public ActionResult MenuBaseEdit()
 {
     ViewData["IsShow"] = false;//是否显示资讯信息(顶级或系统管理不显示)
     ViewData["hfShow"] = true;
     BindControl bc = new BindControl();
     ViewData["mPageType"] = bc.BindSysCodeBase("0001", 2, false, false);//资讯类型
     // ViewData["IsHasFunRole"] = Rolemanager.IsHasFunRole(EmployeeInfo.e_ID, "001001001");//是否拥有管理的权限
     ViewData["IsHasFunRole"] = true;
     Model.MenuBase model = new Model.MenuBase();
     this.ViewData["texOtype"] = RequestBase.GetString("otype");
     switch (RequestBase.GetString("otype"))
     {
         case "modify":
             string ids = RequestBase.GetString("dli_id");
             Guid id = new Guid(ids.Split('|')[0]);
             model = mbBLL.GetModel(id);
             ViewData["hfShow"] = model.m_IsShow;//是否显示导航
             //系统管理
             string bianm = model.m_BianM.Trim();
             if (bianm.Substring(0, 3) == "002" && bianm.Length != 3)
             { ViewData["IsShow"] = true; }
             return View(model);
         default:
             string pids = RequestBase.GetString("dli_id");
             ViewData["hfPId"] = pids;
             string pid = pids.Split('|')[0];
             if (pid != "00000000-0000-0000-0000-000000000000")
             {
                 string pbianm = pids.Split('|')[2];
                 if (pbianm.Substring(0, 3) == "002")
                     ViewData["IsShow"] = true;
             }
             return View();
     }
 }