//Choose Customer ResetMethods// private void Reset() { _customer = null; LblSelected.Hide(); LblSelectedName.Hide(); BtnDeleted.Hide(); BtnUpdate.Hide(); FillDataCustomer(); }
//Choose Customer Cell Click// private void DgvCustomerShow_CellClick(object sender, DataGridViewCellEventArgs e) { try { id = (int)DgvCustomerShow.Rows[e.RowIndex].Cells[0].Value; _customer = _customerDal.GetById(id); LblSelected.Show(); LblSelectedName.Show(); BtnDeleted.Show(); BtnUpdate.Show(); LblSelectedName.Text = _customer.Name + " " + _customer.Surname; } catch { } }