private void AddDistributeObjList(SMT.SaaS.FrameworkUI.OrganizationControl.ExtOrgObj issuanceExtOrgObj, string issuanceID)
        {
            SMT.SaaS.OA.UI.SmtOACommonOfficeService.T_OA_DISTRIBUTEUSER distributeTmp = new SMT.SaaS.OA.UI.SmtOACommonOfficeService.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())    //如果是选择岗位,则保存岗位级别
            {
                //T_HR_POST hr = (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
            {
                if (!string.IsNullOrEmpty(issuanceExtOrgObj.ObjectID))
                {
                    distributeTmp.VIEWER = issuanceExtOrgObj.ObjectID;
                }
                else
                {
                    distributeTmp.VIEWER = Utility.ReturnIssuranceObjID(issuanceExtOrgObj);

                }

                //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;
            if (distributeTmp.VIEWTYPE != ((int)IssuanceObjectType.Post).ToString()) //不提供按部门下的岗位发布
            {
                distributeLists.Add(distributeTmp);
            }
            //distributeLists.Add(distributeTmp);
        }
Ejemplo n.º 2
0
 /// <summary>
 ///保存 发布对象
 /// </summary>
 /// <param name="issuanceExtOrgObj"></param>
 /// <param name="issuanceID"></param>
 private void AddDistributeObjList(SMT.SaaS.FrameworkUI.OrganizationControl.ExtOrgObj issuanceExtOrgObj, string issuanceID)
 {
     SMT.SaaS.OA.UI.SmtOACommonOfficeService.T_OA_DISTRIBUTEUSER distributeTmp = new SMT.SaaS.OA.UI.SmtOACommonOfficeService.T_OA_DISTRIBUTEUSER();
     distributeTmp.DISTRIBUTEUSERID = Guid.NewGuid().ToString();
     distributeTmp.MODELNAME = "OASatisfactionDistribute";
     distributeTmp.FORMID = issuanceID;
     distributeTmp.VIEWTYPE = ((int)GetObjectType(issuanceExtOrgObj)).ToString();
     if (distributeTmp.VIEWTYPE == ((int)IssuanceObjectType.Post).ToString())    //如果是选择岗位,则保存岗位级别
     {
         T_HR_POST hr = (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);
 }