예제 #1
0
        private void CardAdd(object sender, EventArgs e)
        {
            var frm = new Popup.AccountCardInsertPopup()
            {
                ACC_CD      = "",
                BANK_ACC_CD = gd_Bank.Rows[gd_Bank.SelectedCells[0].RowIndex].Cells["ACC_CD"].Value.ToString()
            };

            if (frm.ShowDialog() == DialogResult.OK)
            {
                GetCardInfo(gd_Bank.Rows[gd_Bank.SelectedCells[0].RowIndex].Cells["BNK_COMP_CD"].Value.ToString(), gd_Bank.Rows[gd_Bank.SelectedCells[0].RowIndex].Cells["BNK_NO"].Value.ToString());
            }
        }
예제 #2
0
        private void Card_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridView view = (DataGridView)sender;
            int          row  = gd_Bank.SelectedCells[0].RowIndex;

            if ("DEL".Equals(view.Columns[e.ColumnIndex].Name))
            {
                if (System.Windows.Forms.MessageBox.Show(
                        " 카드 정보를 삭제 하시겠습니까?", "카드 제거"
                        , MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    ClearSearchData();
                    SetSearchData("ACC_CD", view.Rows[e.RowIndex].Cells["ACC_CD"].Value.ToString());
                    SetSearchData("OUT_BANK)NM", gd_Bank.Rows[row].Cells["BNK_COMP_CD"].Value);
                    SetSearchData("OUT_BANK_NO", gd_Bank.Rows[row].Cells["BNK_NO"].Value);
                    SetSearchData("UPT_USER_ID", DTOFactory.UserId);
                    SetServiceId("DelCardAccountList");

                    try
                    {
                        DTOFactory.Transaction(new AccountDTO());

                        ViewMessage.Info("카드 정보를 제거 하였습니다.");

                        _dtCard            = DTOFactory.GetDataTable("ds_card");
                        gd_Card.DataSource = _dtCard;
                    }
                    catch (Exception ex)
                    {
                        ViewMessage.Error(ex.Message);
                    }
                }
            }
            else if ("SAVE".Equals(view.Columns[e.ColumnIndex].Name))
            {
                var frm = new Popup.AccountCardInsertPopup()
                {
                    ACC_CD      = view.Rows[e.RowIndex].Cells["ACC_CD"].Value.ToString(),
                    BANK_ACC_CD = gd_Bank.Rows[row].Cells["ACC_CD"].Value.ToString()
                };

                if (frm.ShowDialog() == DialogResult.OK)
                {
                    ShowBank();
                }
            }
        }