Ejemplo n.º 1
0
        private void GetData(object sender, EventArgs e)
        {
            MES_DB.UserService service = new MES_DB.UserService();
            allList = service.GetAllUserManager();

            dgvSearchResult.DataSource = allList;
        }
Ejemplo n.º 2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            UserManagerVO user = new UserManagerVO();

            MES_DB.UserService service = new MES_DB.UserService();
            user.User_ID   = Convert.ToInt32(txtEditID.Text);
            user.User_Type = cmbEditProcess.SelectedItem.ToString();
            if (cmbEditProcess.SelectedItem.ToString() != "-- 선택 --")
            {
                user.Default_Process_Code = cmbEditUserType.SelectedItem.ToString();
            }
            user.UserGroup_Code = cmbEditGroupCode.SelectedItem.ToString();
            user.UserGroup_Name = txtEditGroupName.Text;

            if (rbEditUseY.Checked == true)
            {
                user.Use_YN = "Y";
            }
            else if (rbEditUserN.Checked == true)
            {
                user.Use_YN = "N";
            }
            else
            {
                MessageBox.Show("사용유무를 선택해주세요.");
            }

            service.UpdateUserManager(user);
            MessageBox.Show("수정되었습니다.");
            frm.btnS.PerformClick();
        }
Ejemplo n.º 3
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if (txtEditUserGroupCode.Text == "" && txtEditUserGroupName.Text == "")
     {
         MessageBox.Show("위의 데이터를 선택하여 수정할 값을 선택해주세요.");
     }
     else
     {
         if (MessageBox.Show("수정하시겠습니까?", "", MessageBoxButtons.YesNo) == DialogResult.Yes)
         {
             UserGroupManagerVO userVo  = new UserGroupManagerVO();
             MES_DB.UserService service = new MES_DB.UserService();
             userVo.UserGroup_Code = txtEditUserGroupCode.Text;
             userVo.UserGroup_Name = txtEditUserGroupName.Text;
             if (rbUse_EditUse.Checked == true)
             {
                 userVo.Use_YN = "Y";
             }
             else if (rbUse_EditNoUse.Checked == true)
             {
                 userVo.Use_YN = "N";
             }
             service.UpdateUserGroupManagerForm(userVo);
             MessageBox.Show("수정되었습니다.");
             frm.btnS.PerformClick();
         }
         else
         {
             MessageBox.Show("취소되었습니다.");
         }
     }
 }
Ejemplo n.º 4
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            UserGroupManagerVO userVo = new UserGroupManagerVO();

            MES_DB.UserService service = new MES_DB.UserService();
            userVo.UserGroup_Code = txtUserCodeInput.Text;
            userVo.UserGroup_Name = txtUserNameInput.Text;
            if (rbUse_Use.Checked == true)
            {
                userVo.Use_YN = "Y";
            }
            else if (rbNoUse_Use.Checked == true)
            {
                userVo.Use_YN = "N";
            }
            else
            {
                MessageBox.Show("사용유무를 체크해주세요.");
                return;
            }
            service.InsUserGroupManagerForm(userVo);

            MessageBox.Show("입력되었습니다.");
            frm.btnS.PerformClick();
        }
Ejemplo n.º 5
0
        private void GetData(object sender, EventArgs e)
        {
            MES_DB.UserService service = new MES_DB.UserService();
            allList = service.UserGroupManagerForm();

            dgvSearchResult.DataSource = allList;
            CommonClass.Userauthority(btnSave, btnEdit);
        }
Ejemplo n.º 6
0
        private void button1_Click(object sender, EventArgs e)
        {
            MES_DB.UserService service = new MES_DB.UserService();
            UserManagerVO      user    = new UserManagerVO();
            int  numchk = 0;
            bool isNum  = int.TryParse(txtUserIDInput.Text, out numchk);

            if (isNum == true)
            {
                user.User_ID = Convert.ToInt32(txtUserIDInput.Text);
            }
            else
            {
                MessageBox.Show("숫자를 입력해주세요.");
                return;
            }

            if (txtUserNameInput.Text != "")
            {
                user.User_Name = txtUserNameInput.Text;
            }
            else
            {
                MessageBox.Show("이름을 입력해주세요.");
                return;
            }

            if (cmbProcess.SelectedIndex != 0)
            {
                user.UserGroup_Code = cmbProcess.SelectedItem.ToString();
            }
            else
            {
                MessageBox.Show("타입 항목을 선택해주세요.");
                return;
            }

            if (cmbProcess.SelectedIndex != 0)
            {
                user.User_Type = cmbProcess.SelectedItem.ToString();
            }
            else
            {
                MessageBox.Show("공정을 선택해주세요.");
                return;
            }

            if (rbUse_Use.Checked == true)
            {
                user.Use_YN = "Y";
            }
            else if (rbNoUse_Use.Checked == true)
            {
                user.Use_YN = "N";
            }
            else
            {
                MessageBox.Show("사용유무를 선택해주세요.");
                return;
            }

            if (cmbGroupCode.SelectedItem.ToString() == "-- 선택 --")
            {
                MessageBox.Show("그룹코드를 입력해주세요.");
                return;
            }
            else
            {
                user.UserGroup_Code = cmbGroupCode.SelectedItem.ToString();
            }

            if (txtGroupName.Text == "")
            {
                MessageBox.Show("그룹 이름을 입력해주세요.");
                return;
            }
            else
            {
                user.UserGroup_Name = txtGroupName.Text;
            }
            user.Default_Process_Code = cmbUserType.SelectedItem.ToString();
            service.InsUserManager(user);
            MessageBox.Show("입력되었습니다.");
            frm.btnS.PerformClick();
        }
Ejemplo n.º 7
0
 private void GetData(object sender, EventArgs e)
 {
     MES_DB.UserService service = new MES_DB.UserService();
     allList = service.GetAllUserGroupPowerSettingForm();
     dgvSearchResult.DataSource = allList;
 }