private void btnThem_Click(object sender, EventArgs e) { if (txtName.Text != "") { tempCustomer = tempCustomer ?? new Customer(); tempCustomer.Name = txtName.Text; tempCustomer.Sex = GetSex(); tempCustomer.Phone = txtSDT.Text; tempCustomer.Type = customer.GetIDByType(txtTypeofCustomer.Text); tempCustomer.isDelete = false; customer.Add(tempCustomer); txtMSKH.Text = customer.GetID(); RefreshTruck(); Refreshs(); LoadDG(); } else { MessageBox.Show("Vui lòng nhập tối thiểu tên của khách hàng"); } }