Example #1
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (dataGridView1.Rows.Count == 0)
            {
                MessageBox.Show("변경할 영업마스터가 없습니다. 영업마스터를 먼저 선택하여 주십시오.", "영업마스터", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
                SetBottomStatusLabel("변경할 영업마스터가 없습니다. 영업마스터를 먼저 선택하여 주십시오.");
            }
            else
            {
                SOMasterVO vo = new SOMasterVO();

                foreach (DataGridViewRow row in this.dataGridView1.SelectedRows)
                {
                    vo = row.DataBoundItem as SOMasterVO;
                }

                //수정버튼
                SODialog frm = new SODialog(SODialog.EditMode.Update, vo);
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    btnSearch.PerformClick();
                    SetBottomStatusLabel("수정이 완료되었습니다.");
                }
            }
        }
Example #2
0
        private void btnRegister_Click(object sender, EventArgs e)
        {
            //등록버튼
            SODialog frm = new SODialog(SODialog.EditMode.Insert);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                btnSearch.PerformClick();
                SetBottomStatusLabel("등록이 완료되었습니다.");
            }
        }