Example #1
0
        private void Login(string id, string password)
        {
            if (String.IsNullOrEmpty(id))
            {
                txtUserId.Focus();
                return;
            }
            else if (String.IsNullOrEmpty(password))
            {
                txtPassword.Focus();
                return;
            }
            //
            //
            //
            string user = CommonDao.GetInstance().PasswordCheck(id, password);

            if (user == null)
            {
                DialogHelper.ShowDialog("로그인 실패!", DialogType.OkOnly);
                txtPassword.Focus();
            }
            else
            {
                SharedCache.UserId = user;

                this.DialogResult = DialogResult.OK;
                this.Close();
            }
        }
        private FormAuthCollection GetAuthCollection(BaseMdiChildForm form)
        {
            if (this.FormAuthCollection != null && this.FormAuthCollection.Changed == false)
            {
                return(this.FormAuthCollection);
            }
            //
            // 로그인 유저의 화면별 권한정보
            //
            this.FormAuthCollection = form.AuthCollection;

            DataTable dt = CommonDao.GetInstance().AuthInfoSelect();

            List <FormAuthInfo> authInfoList = new List <FormAuthInfo>();

            foreach (DataRow row in dt.Rows)
            {
                FormAuthInfo authInfo = new FormAuthInfo(
                    viewId: row["VIEW_ID"].ToString(),
                    authKind: row["AUTH_KIND"].ToString(),
                    value: row["AUTH_YN"].ToString() == "Y" ? true : false);
                authInfoList.Add(authInfo);
            }
            authInfoList = authInfoList.FindAll(view => view.ViewId == form.Name);

            this.FormAuthCollection         = new FormAuthCollection(authInfoList);
            this.FormAuthCollection.Changed = false;

            return(this.FormAuthCollection);
        }
Example #3
0
        public void SetComboBoxValue(string colName, string masterCode)
        {
            DataTable dt = CommonDao.GetInstance().ComboBoxCodeSelect(masterCode);

            if (dt == null)
            {
                return;
            }

            foreach (DataRow row in dt.Rows)
            {
                this.AddComboBoxValue(colName, row);
            }
        }
        private void LoadFormMenuInfo()
        {
            menuCollection = new FormMenuInfoCollection();
            DataTable menuData = CommonDao.GetInstance().MenuSelect();

            foreach (DataRow rowMenu in menuData.Rows)
            {
                FormMenuInfo info = new FormMenuInfo(rowMenu["MENU_ID"].ToString()
                                                     , rowMenu["MENU_DESC"].ToString()
                                                     , rowMenu["PARENT_ID"].ToString()
                                                     , rowMenu["VIEW_ID"].ToString()
                                                     , rowMenu["ASSEMBLY_NAME"].ToString()
                                                     , ""
                                                     , rowMenu["ORDER_SEQ"].ToString()
                                                     , rowMenu["USE_YN"].ToString());
                menuCollection.Add(info);
            }
        }