public CreateForm() { business = new LogicLayer(); InitializeComponent(); this.Load += CreateForm_Load; btnSave.Click += btnSave_Click; btnCancel.Click += btnCancel_Click; }
public RecycleBinForm() { business = new LogicLayer(); InitializeComponent(); this.Load += RecycleBinForm_Load; this.btnRestore.Click += btnRestore_Click; this.dgvRecycle.KeyDown += dgvRecycle_KeyDown; }
public ListForm() { business = new LogicLayer(); InitializeComponent(); this.Load += ListForm_Load; this.dgvListForm.DoubleClick += dataGridView1_DoubleClick; this.dgvListForm.KeyDown += dataGridView1_KeyDown; btnUpdate.Click += btnUpdate_Click; }
public UpdateListForm(string bienSo) { InitializeComponent(); this.bienSo = bienSo; business = new LogicLayer(); this.Load += UpdateListForm_Load; btnSave.Click += btnSave_Click; btnCancel.Click += btnCancel_Click; }
void btnSave_Click(object sender, EventArgs e) { var business = new LogicLayer(); var bienso = this.txtbienSo.Text; var tenxe = this.txtTenxe.Text; int hangxe = int.Parse(this.cboHang.SelectedValue.ToString()); var giogui = this.dtpGui.Value; business.thayDoi(bienso, tenxe, hangxe, giogui); MessageBox.Show("Update class successfully."); this.Close(); }