private void CustomerControl_Load(object sender, EventArgs e) { if (!UserInfo.IsAdmin) DeleteButton.Visible = false; LoadCustomers(); CustomerTextbox.Focus(); }
private void RecentSalesForm_Load(object sender, EventArgs e) { LoadCustomers(); if (!string.IsNullOrWhiteSpace(CustomerName)) { CustomerTextbox.Text = CustomerName; GetCustomerSales(); } else { LoadRecentSales(); } CustomerTextbox.Focus(); }