/// <summary> /// 获取单个服务器变量 /// </summary> /// <param name="Vname"></param> /// <returns></returns> private string GetConditionSql_GetSysVariable(string name) { string returnstr = ""; WX.WXUser cu = WX.Public.CurUser; //WX.Flow.Model.Process.MODEL pmodel = WX.Flow.Model.Process.GetModel("select top 1 * from TE_VarDefine where Title='" + Vname + "'"); //string name = ""; //if (pmodel != null && pmodel.Name.value != null) //{ // name = pmodel.Name.value.ToString(); //} switch (name) { case "PRCS_Z_UserName": cu.LoadUserModel(false); returnstr = cu.UserModel.RealName.value.ToString(); break; case "PRCS_Z_UserDuty": cu.LoadDutyUser(); returnstr = cu.DutyUser.Name.value.ToString(); break; case "PRCS_Z_UserDept": cu.LoadEmployeeUser(); cu.LoadMyDepartment(); returnstr = cu.MyDepartMent.Name.ToString(); break; case "PRCS_Z_UserSupDept": cu.LoadEmployeeUser(); cu.LoadMyDepartment(); WX.Model.Department.MODEL dept2 = WX.Model.Department.GetCache(cu.MyDepartMent.ParentID.ToInt32()); //WX.Model.Department.GetModel("select * from TE_Departments where ID=" + cu.MyDepartMent.ParentID.ToString()); returnstr = dept2.Name.value.ToString(); break; case "PRCS_ID": returnstr = Convert.ToInt32(HttpContext.Current.Request.QueryString["Step_Id"]).ToString(); break; case "Datetime_Now": returnstr = DateTime.Now.ToString("yyyy-MM-dd"); break; default: break; } return(returnstr); }
private void LoadName() { WX.WXUser user = WX.Main.CurUser; user.LoadUserModel(false); user.LoadEmployeeUser(false); if (user.EmployeeUser.Sex.ToBoolean()) { this.imgFace.ImageUrl = "/Images/User/man_icon.gif"; } else { this.imgFace.ImageUrl = "/Images/User/woman_icon.gif"; } this.lblName.Text = user.UserModel.RealName.ToString(); }