Example #1
0
        void ServiceClent_GetUserByEmployeeIDCompleted(object sender, GetUserByEmployeeIDCompletedEventArgs e)
        {
            if (!e.Cancelled)
            {
                if (e.Result != null)
                {
                    sysUser = e.Result as T_SYS_USER;
                    this.tblemployeename.Text   = sysUser.EMPLOYEENAME;
                    this.txtUserName.Text       = sysUser.USERNAME;
                    this.txtPassword.Password   = SMT.SaaS.FrameworkUI.Common.Utility.Decrypt(sysUser.PASSWORD);
                    this.txtConfirmpwd.Password = SMT.SaaS.FrameworkUI.Common.Utility.Decrypt(sysUser.PASSWORD);
                    this.txtRemark.Text         = sysUser.REMARK == null ? "" : sysUser.REMARK;
                    if (!string.IsNullOrEmpty(sysUser.OWNERCOMPANYID))
                    {
                        GetCompanyNameByCompanyID(sysUser.OWNERCOMPANYID);
                    }
                    if (sysUser.ISMANGER == 1)
                    {
                        this.rbtIsAutoyes.IsChecked = true;
                    }
                    else
                    {
                        this.rbtIsAutono.IsChecked = true;
                    }
                    if (sysUser.ISENGINEMANAGER == "1")
                    {
                        this.rbtengine.IsChecked = true;
                    }
                    else
                    {
                        this.rbtengineno.IsChecked = true;
                    }
                    if (sysUser.ISFLOWMANAGER == "1")
                    {
                        this.rbtflow.IsChecked = true;
                    }
                    else
                    {
                        this.rbtflowno.IsChecked = true;
                    }
                    if (sysUser.STATE == "0")
                    {
                        this.tblstate.Text = "禁用";
                        //this.tblstate.Foreground = SystemColors.
                        btnSet.Content = Utility.GetResourceStr("STARTUSING");
                        //FormToolBar1.btnOtherAction("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_4424.png", Utility.GetResourceStr("STARTUSING")).Click += new RoutedEventHandler(SysUserSetIsActived_Click);
                    }
                    else
                    {
                        this.tblstate.Text = "正常";
                        btnSet.Content     = Utility.GetResourceStr("FORBIDUSE");
                        //FormToolBar1.btnOtherAction("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_4424.png", Utility.GetResourceStr("FORBIDUSE")).Click += new RoutedEventHandler(SysUserManagement_Click);
                    }
                    ShowSupperAdmin(sysUser.SYSUSERID);
                    #region 获取用户薪资密码
                    int    pageCount = 0;
                    string filter    = "";
                    System.Collections.ObjectModel.ObservableCollection <string> paras = new System.Collections.ObjectModel.ObservableCollection <string>();
                    filter += "MODELTYPE==@" + paras.Count().ToString();
                    paras.Add("4");
                    filter += " and OWNERID==@" + paras.Count().ToString();
                    paras.Add(sysUser.EMPLOYEEID);
                    salaryClient.GetSystemParamSetPagingAsync(1, 20, "PARAMETERNAME", filter, paras, pageCount, sysUser.EMPLOYEEID);

                    #endregion
                }
            }
        }
Example #2
0
 /// <summary>
 /// 根据员工ID 获取用户信息
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void PermClient_GetUserByEmployeeIDCompleted(object sender, GetUserByEmployeeIDCompletedEventArgs e)
 {
     if (e.Error != null && e.Error.Message != string.Empty)
     {
         ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
     }
     else
     {
         SysUser = e.Result;
     }
 }
Example #3
0
        void ServiceClent_GetUserByEmployeeIDCompleted(object sender, GetUserByEmployeeIDCompletedEventArgs e)
        {
            if (!e.Cancelled)
            {
                if (e.Result != null)
                {
                    sysUser = e.Result as T_SYS_USER;
                    this.tblemployeename.Text = sysUser.EMPLOYEENAME;
                    this.txtUserName.Text = sysUser.USERNAME;
                    this.txtPassword.Password = SMT.SaaS.FrameworkUI.Common.Utility.Decrypt( sysUser.PASSWORD);
                    this.txtConfirmpwd.Password = SMT.SaaS.FrameworkUI.Common.Utility.Decrypt(sysUser.PASSWORD);
                    this.txtRemark.Text = sysUser.REMARK == null ? "" : sysUser.REMARK;
                    if (!string.IsNullOrEmpty(sysUser.OWNERCOMPANYID))
                    {
                        GetCompanyNameByCompanyID(sysUser.OWNERCOMPANYID);
                    }
                    if (sysUser.ISMANGER == 1)
                    {
                        this.rbtIsAutoyes.IsChecked = true;
                    }
                    else
                    {
                        this.rbtIsAutono.IsChecked = true;
                    }
                    if (sysUser.ISENGINEMANAGER == "1")
                    {
                        this.rbtengine.IsChecked = true;
                    }
                    else
                    {
                        this.rbtengineno.IsChecked = true;
                    }
                    if (sysUser.ISFLOWMANAGER == "1")
                    {
                        this.rbtflow.IsChecked = true;
                    }
                    else
                    {
                        this.rbtflowno.IsChecked = true;
                    }
                    if (sysUser.STATE == "0")
                    {
                        this.tblstate.Text = "禁用";
                        //this.tblstate.Foreground = SystemColors.
                        btnSet.Content = Utility.GetResourceStr("STARTUSING");
                        //FormToolBar1.btnOtherAction("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_4424.png", Utility.GetResourceStr("STARTUSING")).Click += new RoutedEventHandler(SysUserSetIsActived_Click);
                    }
                    else
                    {
                        this.tblstate.Text = "正常";
                        btnSet.Content = Utility.GetResourceStr("FORBIDUSE");
                        //FormToolBar1.btnOtherAction("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_4424.png", Utility.GetResourceStr("FORBIDUSE")).Click += new RoutedEventHandler(SysUserManagement_Click);
                    }

                    #region 获取用户薪资密码
                    int pageCount = 0;
                    string filter = "";
                    System.Collections.ObjectModel.ObservableCollection<string> paras = new System.Collections.ObjectModel.ObservableCollection<string>();
                    filter += "MODELTYPE==@" + paras.Count().ToString();
                    paras.Add("4");
                    filter += " and OWNERID==@" + paras.Count().ToString();
                    paras.Add(sysUser.EMPLOYEEID);
                    salaryClient.GetSystemParamSetPagingAsync(1, 20, "PARAMETERNAME", filter, paras, pageCount, sysUser.EMPLOYEEID);

                    #endregion
                }
            }
        }
Example #4
0
        void perclient_GetUserByEmployeeIDCompleted(object sender, GetUserByEmployeeIDCompletedEventArgs e)
        {
            if (e.Error != null && e.Error.Message != "")
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
            }
            else
            {
                SysUser = new T_SYS_USER();
                SysUser = e.Result;
                if (SysUser != null)
                {
                    txtUser.Text = SysUser.USERNAME;
                    txtPwd.Password = SysUser.PASSWORD;
                    OldPassword = SysUser.PASSWORD;
                    txtMark.Text = SysUser.REMARK == null ? string.Empty : SysUser.REMARK;
                }
                else
                {
                    //Configclient.GetAppConfigByNameAsync("isForHuNanHangXingSalary");
                }

            }
        }