Beispiel #1
0
 void Department_Loaded(object sender, RoutedEventArgs e)
 {
     GetEntityLogo("T_HR_DEPARTMENT");
     //  Utility.DisplayGridToolBarButton(ToolBar, "T_HR_DEPARTMENT", true);
     Utility.CbxItemBinder(ToolBar.cbxCheckState, "CHECKSTATE", Convert.ToInt32(CheckStates.All).ToString());
     //绑定公司
     client.GetCompanyActivedAsync(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID);
 }
Beispiel #2
0
 //绑定树
 private void BindTree()
 {
     if (Application.Current.Resources.Contains("SYS_CompanyInfo"))
     {
         BindCompany();
     }
     else
     {
         orgClient.GetCompanyActivedAsync(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID);
     }
 }
Beispiel #3
0
        /// <summary>
        /// 读取公司信息
        /// </summary>
        private void LoadCompanyInfo()
        {
            string strOwnerId = string.Empty;

            if (Common.CurrentLoginUserInfo != null)
            {
                strOwnerId = Common.CurrentLoginUserInfo.EmployeeID;
            }
            loadbar.setloadingMessage("开始获取公司信息......");
            organClient.GetCompanyActivedAsync(strOwnerId);
            //organClient.GetALLCompanyViewAsync(strOwnerId);
        }
Beispiel #4
0
 //绑定树
 private void BindTree()
 {
     if (Application.Current.Resources.Contains("SYS_CompanyInfo"))
     {
         // allCompanys = Application.Current.Resources["SYS_CompanyInfo"] as List<SMT.Saas.Tools.OrganizationWS.T_HR_COMPANY>;
         BindCompany();
     }
     else
     {
         orgClient.GetCompanyActivedAsync(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID);
     }
 }
 /// <summary>
 /// 初始化
 /// </summary>
 void ImportOrgInfoForm_Load()
 {
     client.GetCompanyActivedAsync(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID);
 }
Beispiel #6
0
 private void BindTree()
 {
     client.GetCompanyActivedAsync(Common.CurrentLoginUserInfo.EmployeeID);
 }
 //绑定树
 private void BindTree()
 {
     orgClient.GetCompanyActivedAsync(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID);
 }
Beispiel #8
0
        private void OK_Click(object sender, RoutedEventArgs e)
        {
            isLogining = true;
            RefreshBtn();
            SaveData();
            string StrUserName = ""; //用户名
            string StrPwd      = ""; //密码
            string StrCode     = ""; //验证码

            StrUserName = UserName.Text.ToString().Trim();
            StrPwd      = paw.Password.ToString().Trim();
            //暂时不使用
            StrCode = YanZM.Text.ToString().Trim();


            if (string.IsNullOrEmpty(StrUserName))
            {
                Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("USERNAMENOTNULL"));
                UserName.Focus();
                return;
            }
            if (string.IsNullOrEmpty(StrPwd))
            {
                Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("PASSWORDNOTNULL"));
                paw.Focus();
                return;
            }

            //StrPwd = Utility.AESEncrypt(StrPwd);

            login = new UserLogin(StrUserName, StrPwd);
            login.LoginedClick += (obj, ev) =>
            {
                isLogining = false;
                if (login.LoginResult)
                {
                    UserInfo = login.GetUserInfo();

                    if (App.Current.Resources["CurrentUserID"] == null)
                    {
                        App.Current.Resources.Add("CurrentUserID", UserInfo.EMPLOYEEID);
                    }
                    settings["UserName"] = StrUserName;
                    settings["UserPWD"]  = StrPwd;
                    settings.Save();
                    isLogin = true;
                    string strEmployeeID = string.Empty;
                    if (SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo != null)
                    {
                        strEmployeeID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                    }
                    if (!settings.Contains("SYS_PostInfo"))
                    {
                        organClient.GetCompanyActivedAsync(strEmployeeID);
                        isLogining = true;
                    }
                }
                else
                {
                    MessageBox.Show("用户或密码错误!");
                }

                RefreshBtn();
            };
        }