コード例 #1
0
 private void AddDistributeObjList(SMT.SaaS.FrameworkUI.OrganizationControl.ExtOrgObj issuanceExtOrgObj, string issuanceID)
 {
     SMT.SaaS.OA.UI.SmtOAPersonOfficeService.T_OA_DISTRIBUTEUSER distributeTmp = new SMT.SaaS.OA.UI.SmtOAPersonOfficeService.T_OA_DISTRIBUTEUSER();
     distributeTmp.DISTRIBUTEUSERID = Guid.NewGuid().ToString();
     distributeTmp.MODELNAME        = "EmployeeSurveyDistribute";
     distributeTmp.FORMID           = issuanceID;
     distributeTmp.VIEWTYPE         = ((int)GetObjectType(issuanceExtOrgObj)).ToString();
     if (distributeTmp.VIEWTYPE == ((int)IssuanceObjectType.Post).ToString())    //如果是选择岗位,则保存岗位级别
     {
         SMT.Saas.Tools.OrganizationWS.T_HR_POST hr = (SMT.Saas.Tools.OrganizationWS.T_HR_POST)issuanceExtOrgObj.ObjectInstance;
         if (!string.IsNullOrEmpty(hr.POSTLEVEL.ToString()))
         {
             distributeTmp.VIEWER = hr.POSTLEVEL.ToString();
         }
         else
         {
             distributeTmp.VIEWER = hr.T_HR_POSTDICTIONARY.POSTLEVEL.ToString();
         }
     }
     else
     {
         distributeTmp.VIEWER = issuanceExtOrgObj.ObjectID;
     }
     distributeTmp.CREATEDATE         = DateTime.Now;
     distributeTmp.CREATEUSERID       = Common.CurrentLoginUserInfo.EmployeeID;
     distributeTmp.CREATEUSERNAME     = Common.CurrentLoginUserInfo.EmployeeName;
     distributeTmp.CREATEPOSTID       = Common.CurrentLoginUserInfo.UserPosts[0].PostID;
     distributeTmp.CREATEDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
     distributeTmp.CREATECOMPANYID    = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
     distributeTmp.OWNERID            = Common.CurrentLoginUserInfo.EmployeeID;
     distributeTmp.OWNERNAME          = Common.CurrentLoginUserInfo.EmployeeName;
     distributeTmp.OWNERPOSTID        = Common.CurrentLoginUserInfo.UserPosts[0].PostID;
     distributeTmp.OWNERDEPARTMENTID  = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
     distributeTmp.OWNERCOMPANYID     = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
     distributeLists.Add(distributeTmp);
 }
コード例 #2
0
 private void AddDistributeObjList(SMT.SaaS.FrameworkUI.OrganizationControl.ExtOrgObj issuanceExtOrgObj, string issuanceID)
 {
     SMT.SaaS.OA.UI.SmtOAPersonOfficeService.T_OA_DISTRIBUTEUSER distributeTmp = new SMT.SaaS.OA.UI.SmtOAPersonOfficeService.T_OA_DISTRIBUTEUSER();
     distributeTmp.DISTRIBUTEUSERID = Guid.NewGuid().ToString();
     distributeTmp.MODELNAME = "EmployeeSurveyDistribute";
     distributeTmp.FORMID = issuanceID;
     distributeTmp.VIEWTYPE = ((int)GetObjectType(issuanceExtOrgObj)).ToString();
     if (distributeTmp.VIEWTYPE == ((int)IssuanceObjectType.Post).ToString())    //如果是选择岗位,则保存岗位级别
     {
         SMT.Saas.Tools.OrganizationWS.T_HR_POST hr = (SMT.Saas.Tools.OrganizationWS.T_HR_POST)issuanceExtOrgObj.ObjectInstance;
         if (!string.IsNullOrEmpty(hr.POSTLEVEL.ToString()))
             distributeTmp.VIEWER = hr.POSTLEVEL.ToString();
         else
             distributeTmp.VIEWER = hr.T_HR_POSTDICTIONARY.POSTLEVEL.ToString();
     }
     else
     {
         distributeTmp.VIEWER = issuanceExtOrgObj.ObjectID;
     }
     distributeTmp.CREATEDATE = DateTime.Now;
     distributeTmp.CREATEUSERID = Common.CurrentLoginUserInfo.EmployeeID;
     distributeTmp.CREATEUSERNAME = Common.CurrentLoginUserInfo.EmployeeName;
     distributeTmp.CREATEPOSTID = Common.CurrentLoginUserInfo.UserPosts[0].PostID;
     distributeTmp.CREATEDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
     distributeTmp.CREATECOMPANYID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
     distributeTmp.OWNERID = Common.CurrentLoginUserInfo.EmployeeID;
     distributeTmp.OWNERNAME = Common.CurrentLoginUserInfo.EmployeeName;
     distributeTmp.OWNERPOSTID = Common.CurrentLoginUserInfo.UserPosts[0].PostID;
     distributeTmp.OWNERDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
     distributeTmp.OWNERCOMPANYID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
     distributeLists.Add(distributeTmp);
 }