private void btnAdd_Click(object sender, EventArgs e) { DtoWarehouse w = new DtoWarehouse(); w.MaKho = txtWarehouseID.Text.ToString(); w.TenKho = txtWarehouseName.Text.ToString(); w.GhiChu = txtNote.Text.ToString(); if (_isEditing) { if (_bllWarehouse.EditWarehouse(w)) { MessageBox.Show(Constants.MsgNotificationEditSuccessfuly); } else { MessageBox.Show(Constants.MsgAlreadyExist); } btnCancel.PerformClick(); return; } if (_bllWarehouse.AddWarehouse(w)) { MessageBox.Show(Constants.MsgNotificationSuccessfuly); } else { MessageBox.Show(Constants.MsgAlreadyExist); } }