Exemple #1
0
        void DetailSendClient_GetDocDistrbuteInfosCompleted(object sender, GetDocDistrbuteInfosCompletedEventArgs e)
        {
            if (!e.Cancelled)
            {
                if (e.Result != null)
                {
                    string StrViewType = "";
                    string ViewType    = "";
                    string StrViewer   = "发布对象  \n";
                    string StrDate     = "";
                    string StrReturn   = ""; //总输出
                    List <T_OA_DISTRIBUTEUSER> ListDistrbute = e.Result.ToList();
                    foreach (var bb in ListDistrbute)
                    {
                        //bb.VIEWTYPE

                        switch (bb.VIEWTYPE)
                        {
                        case "0":
                            ViewType = "按公司发布";
                            //获取公司名称
                            StrViewer += bb.VIEWER + "\n";
                            break;

                        case "1":
                            ViewType = "按部门发布";
                            //获取部门名称
                            StrViewer += bb.VIEWER + "\n";
                            break;

                        case "2":
                            ViewType = "按个人发布";
                            //获取个人名称
                            StrViewer += bb.VIEWER + "\n";
                            break;
                        }
                        if (bb.VIEWTYPE != StrViewType)
                        {
                            StrViewType = bb.VIEWTYPE;
                            StrReturn  += "发布类型:" + ViewType + "\n";
                        }
                        if (bb.CREATEDATE.ToShortDateString() != StrDate)
                        {
                            StrDate    = bb.CREATEDATE.ToShortDateString();
                            StrReturn += "发布时间:" + StrDate + "\n";
                        }
                        StrReturn += StrViewer;
                    }

                    this.tblDistrbuteDetail.Text = StrReturn;
                }
            }
        }
        //获取发布对象
        void DocDistrbuteClient_GetDocDistrbuteInfosCompleted(object sender, GetDocDistrbuteInfosCompletedEventArgs e)
        {
            try
            {
                if (e.Error == null)
                {
                    if (e.Result != null)
                    {
                        List<SMT.SaaS.OA.UI.SmtOACommonOfficeService.T_OA_DISTRIBUTEUSER> distributeList = e.Result.ToList();

                        foreach (var h in distributeList)
                        {
                            object obj = new object();
                            SMT.SaaS.FrameworkUI.OrganizationControl.ExtOrgObj extOrgObj = new SMT.SaaS.FrameworkUI.OrganizationControl.ExtOrgObj();
                            if (h.VIEWTYPE == ((int)SMT.SaaS.FrameworkUI.OrgTreeItemTypes.Company).ToString())
                            {
                                T_HR_COMPANY tmp = new T_HR_COMPANY();
                                tmp.COMPANYID = h.VIEWER;
                                //tmp.CNAME = "";
                                tmp.CNAME = Utility.GetCompanyName(tmp.COMPANYID);
                                obj = tmp;
                            }
                            else if (h.VIEWTYPE == ((int)SMT.SaaS.FrameworkUI.OrgTreeItemTypes.Department).ToString())
                            {
                                T_HR_DEPARTMENT tmp = new T_HR_DEPARTMENT();
                                tmp.DEPARTMENTID = h.VIEWER;
                                T_HR_DEPARTMENTDICTIONARY tmpdict = new T_HR_DEPARTMENTDICTIONARY();
                                //tmpdict.DEPARTMENTNAME = "";
                                tmpdict.DEPARTMENTNAME = Utility.GetDepartmentName(h.VIEWER);
                                tmp.T_HR_DEPARTMENTDICTIONARY = tmpdict;
                                obj = tmp;
                            }
                            else if (h.VIEWTYPE == ((int)SMT.SaaS.FrameworkUI.OrgTreeItemTypes.Post).ToString())
                            {
                                T_HR_POST tmp = new T_HR_POST();
                                tmp.POSTLEVEL = System.Convert.ToDecimal(h.VIEWER);
                                T_HR_POSTDICTIONARY tmpdict = new T_HR_POSTDICTIONARY();
                                //tmpdict.POSTNAME = "";
                                tmpdict.POSTNAME = Utility.GetPostName(h.VIEWER);
                                tmp.T_HR_POSTDICTIONARY = tmpdict;

                                obj = tmp;
                            }
                            else if (h.VIEWTYPE == ((int)SMT.SaaS.FrameworkUI.OrgTreeItemTypes.Personnel).ToString())
                            {
                                T_HR_EMPLOYEE tmp = new T_HR_EMPLOYEE();
                                tmp.EMPLOYEEID = h.VIEWER;
                                tmp.EMPLOYEECNAME = "";
                                obj = tmp;
                            }
                            extOrgObj.ObjectInstance = obj;

                            issuanceExtOrgObj.Add(extOrgObj);
                        }
                        BindData();
                    }
                }
                else
                    Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), e.Error.Message);
            }
            catch (Exception ex)
            {
                //HtmlPage.Window.Alert(ex.ToString());
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(ex.Message.ToString()));
            }
        }
Exemple #3
0
        void DocDistrbuteClient_GetDocDistrbuteInfosCompleted(object sender, GetDocDistrbuteInfosCompletedEventArgs e)
        {
            try
            {
                if (e.Error == null)
                {
                    if (e.Result != null)
                    {
                        distributeList = e.Result;

                        
                        

                        foreach (var h in distributeList)
                        {
                            object obj = new object();
                            SMT.SaaS.FrameworkUI.OrganizationControl.ExtOrgObj extOrgObj = new SMT.SaaS.FrameworkUI.OrganizationControl.ExtOrgObj();
                            if (h.VIEWTYPE == ((int)SMT.SaaS.FrameworkUI.OrgTreeItemTypes.Company).ToString())
                            {
                                SMT.Saas.Tools.OrganizationWS.T_HR_COMPANY tmp = new SMT.Saas.Tools.OrganizationWS.T_HR_COMPANY();
                                tmp.COMPANYID = h.VIEWER;

                                tmp.CNAME = Utility.GetCompanyName(tmp.COMPANYID);
                                obj = tmp;
                                StrCompanyIDsList.Add(h.VIEWER);
                            }
                            else if (h.VIEWTYPE == ((int)SMT.SaaS.FrameworkUI.OrgTreeItemTypes.Department).ToString())
                            {
                                SMT.Saas.Tools.OrganizationWS.T_HR_DEPARTMENT tmp = new SMT.Saas.Tools.OrganizationWS.T_HR_DEPARTMENT();
                                tmp.DEPARTMENTID = h.VIEWER;
                                SMT.Saas.Tools.OrganizationWS.T_HR_DEPARTMENTDICTIONARY tmpdict = new SMT.Saas.Tools.OrganizationWS.T_HR_DEPARTMENTDICTIONARY();
                                tmpdict.DEPARTMENTNAME = Utility.GetDepartmentName(h.VIEWER);
                                tmp.T_HR_DEPARTMENTDICTIONARY = tmpdict;
                                obj = tmp;
                                StrDepartmentIDsList.Add(h.VIEWER);
                            }
                            else if (h.VIEWTYPE == ((int)SMT.SaaS.FrameworkUI.OrgTreeItemTypes.Post).ToString())
                            {
                                SMT.Saas.Tools.OrganizationWS.T_HR_POST tmp = new SMT.Saas.Tools.OrganizationWS.T_HR_POST();
                                tmp.POSTLEVEL = System.Convert.ToDecimal(h.VIEWER);
                                SMT.Saas.Tools.OrganizationWS.T_HR_POSTDICTIONARY tmpdict = new SMT.Saas.Tools.OrganizationWS.T_HR_POSTDICTIONARY();
                                tmpdict.POSTNAME = Utility.GetPostName(h.VIEWER);
                                tmp.T_HR_POSTDICTIONARY = tmpdict;
                                
                                obj = tmp;
                                StrPositionIDsList.Add(h.VIEWER);
                            }
                            else if (h.VIEWTYPE == ((int)SMT.SaaS.FrameworkUI.OrgTreeItemTypes.Personnel).ToString())
                            {
                                SMT.Saas.Tools.PersonnelWS.T_HR_EMPLOYEE tmp = new SMT.Saas.Tools.PersonnelWS.T_HR_EMPLOYEE();
                                tmp.EMPLOYEEID = h.VIEWER;
                                tmp.EMPLOYEECNAME = Utility.GetDistrbuteUserName(tmp.EMPLOYEEID,vemployeeObj);
                                obj = tmp;
                                if (!(StrStaffList.IndexOf(h.VIEWER) >0))
                                {
                                    StaffList.Add(h.VIEWER);
                                }
                            }
                            extOrgObj.ObjectInstance = obj;
                            issuanceExtOrgObj.Add(extOrgObj);
                        }
                        //personclient.GetEmployeeDetailByParasAsync(StrCompanyIDsList, StrDepartmentIDsList, StrPositionIDsList, StaffList);
                        //RefreshUI(RefreshedTypes.ShowProgressBar);
                        //personclient.GetEmployeeIDsByParasAsync(StrCompanyIDsList,StrDepartmentIDsList,StrPositionIDsList);
                        //StaffList.Clear();//将对象员工清除
                        //personclient.GetEmployeeIDsWithParasAsync(StrCompanyIDsList, true, StrDepartmentIDsList, true, StrPositionIDsList);
                        BindData();
                    }
                }
                else
                {
                    //HtmlPage.Window.Alert(e.Error.ToString());

                    //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), e.Error.Message);
                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                }
            }
            catch (Exception ex)
            {
                //HtmlPage.Window.Alert(ex.ToString());
                //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(ex.Message.ToString()));
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
            }
        }
Exemple #4
0
        void DetailSendClient_GetDocDistrbuteInfosCompleted(object sender, GetDocDistrbuteInfosCompletedEventArgs e)
        {
            if (!e.Cancelled)
            {
                if (e.Result != null)
                {
                    string StrViewType = "";
                    string ViewType = "";
                    string StrViewer = "发布对象  \n";
                    string StrDate = "";
                    string StrReturn = "";  //总输出
                    List<T_OA_DISTRIBUTEUSER> ListDistrbute = e.Result.ToList();
                    foreach (var bb in ListDistrbute)
                    {
                        //bb.VIEWTYPE

                        switch (bb.VIEWTYPE)
                        {
                            case "0":
                                ViewType = "按公司发布";
                                //获取公司名称
                                StrViewer += bb.VIEWER + "\n";
                                break;
                            case "1":
                                ViewType = "按部门发布";
                                //获取部门名称
                                StrViewer += bb.VIEWER + "\n";
                                break;
                            case "2":
                                ViewType = "按个人发布";
                                //获取个人名称
                                StrViewer += bb.VIEWER + "\n";
                                break;
                        }
                        if (bb.VIEWTYPE != StrViewType)
                        {
                            StrViewType = bb.VIEWTYPE;
                            StrReturn += "发布类型:" + ViewType + "\n";
                        }
                        if (bb.CREATEDATE.ToShortDateString() != StrDate)
                        {
                            StrDate = bb.CREATEDATE.ToShortDateString();
                            StrReturn += "发布时间:" + StrDate + "\n";
                        }
                        StrReturn += StrViewer;


                    }


                }
            }
        }
        void DocDistrbuteClient_GetDocDistrbuteInfosCompleted(object sender, GetDocDistrbuteInfosCompletedEventArgs e)
        {
            try
            {
                if (e.Error == null)
                {
                    if (e.Result != null)
                    {
                        List<SMT.SaaS.OA.UI.SmtOACommonOfficeService.T_OA_DISTRIBUTEUSER> distributeList = e.Result.ToList();

                        foreach (var h in distributeList)
                        {
                            object obj = new object();
                            SMT.SaaS.FrameworkUI.OrganizationControl.ExtOrgObj extOrgObj = new SMT.SaaS.FrameworkUI.OrganizationControl.ExtOrgObj();
                            if (h.VIEWTYPE == ((int)SMT.SaaS.FrameworkUI.OrgTreeItemTypes.Company).ToString())
                            {
                                T_HR_COMPANY tmp = new T_HR_COMPANY();
                                tmp.COMPANYID = h.VIEWER;
                                tmp.CNAME = "";
                                obj = tmp;
                            }
                            else if (h.VIEWTYPE == ((int)SMT.SaaS.FrameworkUI.OrgTreeItemTypes.Department).ToString())
                            {
                                T_HR_DEPARTMENT tmp = new T_HR_DEPARTMENT();
                                tmp.DEPARTMENTID = h.VIEWER;
                                T_HR_DEPARTMENTDICTIONARY tmpdict = new T_HR_DEPARTMENTDICTIONARY();
                                tmpdict.DEPARTMENTNAME = "";
                                tmp.T_HR_DEPARTMENTDICTIONARY = tmpdict;
                                obj = tmp;
                            }
                            else if (h.VIEWTYPE == ((int)SMT.SaaS.FrameworkUI.OrgTreeItemTypes.Post).ToString())
                            {
                                T_HR_POST tmp = new T_HR_POST();
                                tmp.POSTLEVEL = System.Convert.ToDecimal(h.VIEWER);
                                T_HR_POSTDICTIONARY tmpdict = new T_HR_POSTDICTIONARY();
                                tmpdict.POSTNAME = "";
                                tmp.T_HR_POSTDICTIONARY = tmpdict;

                                obj = tmp;
                            }
                            else if (h.VIEWTYPE == ((int)SMT.SaaS.FrameworkUI.OrgTreeItemTypes.Personnel).ToString())
                            {
                                T_HR_EMPLOYEE tmp = new T_HR_EMPLOYEE();
                                tmp.EMPLOYEEID = h.VIEWER;
                                tmp.EMPLOYEECNAME = "";
                                obj = tmp;
                            }
                            extOrgObj.ObjectInstance = obj;

                            issuanceExtOrgObj.Add(extOrgObj);
                        }
                        BindData();
                    }
                }
                else
                    Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), e.Error.Message);
            }
            catch (Exception ex)
            {
                //HtmlPage.Window.Alert(ex.ToString());
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(ex.Message.ToString()));
            }
        }