示例#1
0
        private void CallMainWindow()
        {
            try
            {
                // 전역으로 사용하는 사용자 ID를 사용자 정보에 저장한다.
                this.BaseClass.UserID = this.txtUserID.Text.Trim();

                if (this.chkRememberID.IsChecked == true)
                {
                    this.BaseClass.LoginUserID = this.txtUserID.Text.Trim();    // 사용자 ID
                }
                else
                {
                    this.BaseClass.LoginUserID = string.Empty;
                }

                // 선택한 센터코드를 사용자 정보에 저장한다.
                this.BaseClass.LoginCenterCD = KioskBaseClass.ComboBoxSelectedKeyValue(this.cboCenter);

                MainWindow frmMain = new MainWindow();
                frmMain.Show();

                this.Close();
            }
            catch { throw; }
        }
示例#2
0
        private void LoginProcess()
        {
            try
            {
                var strUserID = this.txtUserID.Text.Trim();         // 사용자 ID

                #region + 로그인 성공
                if (this.chkRememberID.IsChecked == true)
                {
                    this.BaseClass.LoginUserID = strUserID;
                }
                else
                {
                    this.BaseClass.LoginUserID = string.Empty;
                }

                // 센터코드를 저장한다.
                this.BaseClass.CenterCD    = KioskBaseClass.ComboBoxSelectedKeyValue(this.cboCenter);
                this.BaseClass.CountryCode = KioskBaseClass.ComboBoxSelectedKeyValue(this.cboLang);

                var dsLoginInfo = this.GetMenuList();

                var query = dsLoginInfo.Tables[0].AsEnumerable().Where(p => p.Field <string>("MENU_TYPE") == "KIOSK" && p.Field <string>("PARENT_ID") != "FVRT").ToList();


                if (dsLoginInfo.Tables[0].Rows.Count == 0)
                {
                    // ERR_NOT_MENU_DATA - 메뉴 데이터가 없습니다.
                    //this.BaseClass.MsgError("ERR_NOT_MENU_DATA");
                    return;
                }
                else
                {
                    if (query.Count > 0)
                    {
                        this.BaseClass.RememberChecked = this.chkRememberID.IsChecked == true ? true : false;

                        foreach (var item in query)
                        {
                            // 권한코드를 설정한다.
                            this.BaseClass.RoleCode = item.Field <string>("ROLE_MENU_CD");
                        }

                        this.CallMainWindow();
                    }
                }
                #endregion
            }
            catch { throw; }
        }