예제 #1
0
        /// <summary>
        /// 登録ボタンクリックイベント
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void regist_Click(object sender, EventArgs e)
        {
            UserKanriRegistServiceInBo userRegistServiceInBo = new UserKanriRegistServiceInBo();

            userRegistServiceInBo.empId                  = this.empId.Text.ToString();
            userRegistServiceInBo.userName               = this.userName.Text.ToString();
            userRegistServiceInBo.kengenSelectedIndex    = this.kengen.SelectedIndex;
            userRegistServiceInBo.userKanriDataGridView1 = this.userKanriDataGridView1;
            UserKanriRegistService userRegistService = new UserKanriRegistService();

            userRegistService.setInBo(userRegistServiceInBo);
            UserKanriRegistServiceOutBo userRegistServiceOutBo = userRegistService.execute();

            if (!String.IsNullOrEmpty(userRegistServiceOutBo.errorMessage))
            {
                MessageBox.Show(
                    userRegistServiceOutBo.errorMessage,
                    "入力エラー",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Warning);

                return;
            }

            MessageBox.Show(MessageConst.CONF_004);
            if (BaseForm.UserInfo.empId == userRegistServiceOutBo.empId)
            {
                MessageBox.Show(MessageConst.CONF_009);
            }
            bool isDoneRegist = true;

            this.searchAction(ref userKanriDataGridView1, this, isDoneRegist);
        }
예제 #2
0
        /// <summary>
        /// 登録ボタンクリックイベント
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void regist_Click(object sender, EventArgs e)
        {
            UserKanriRegistServiceInBo userRegistServiceInBo = new UserKanriRegistServiceInBo();
            userRegistServiceInBo.empId = this.empId.Text.ToString();
            userRegistServiceInBo.userName = this.userName.Text.ToString();
            userRegistServiceInBo.kengenSelectedIndex = this.kengen.SelectedIndex;
            userRegistServiceInBo.userKanriDataGridView1 = this.userKanriDataGridView1;
            UserKanriRegistService userRegistService = new UserKanriRegistService();
            userRegistService.setInBo(userRegistServiceInBo);
            UserKanriRegistServiceOutBo userRegistServiceOutBo = userRegistService.execute();

            if (!String.IsNullOrEmpty(userRegistServiceOutBo.errorMessage))
            {
                MessageBox.Show(
                    userRegistServiceOutBo.errorMessage,
                    "入力エラー",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Warning);

                return;
            }

            MessageBox.Show(MessageConst.CONF_004);
            if (BaseForm.UserInfo.empId == userRegistServiceOutBo.empId)
            {
                MessageBox.Show(MessageConst.CONF_009);
            }
            bool isDoneRegist = true;
            this.searchAction(ref userKanriDataGridView1, this, isDoneRegist);
        }