Beispiel #1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            DTO_Customer info = new DTO_Customer();

            info.Id          = Convert.ToInt32(txtId.Text);
            info.Fullname    = txtFullname.Text;
            info.Address     = txtAddress.Text;
            info.PhoneNumber = txtPhonenumber.Text;

            if (this.action == "edit")
            {
                bus.editItem(info);
            }

            foreach (DataGridViewRow row in dataGridView.SelectedRows)
            {
                this.index = row.Index;
            }

            GUI_Customer_Load(sender, e);
            endableAll(true);
            dataGridView.CurrentCell = dataGridView.Rows[this.index].Cells[0];
        }