private void Customerfrm_Load(object sender, EventArgs e) { simpleButton2.Visible = false; btnUpdate.Visible = false; btnDelete.Visible = false; if (Powers == PowersLog.Administrator || Powers == PowersLog.Saler) { simpleButton2.Visible = true; btnUpdate.Visible = true; btnDelete.Visible = true; } cusList = new CusList(); tripsList = new Trips(); ordersList = new OrderList(); toursList = new ToursList(); lblExpresstion.Text = ""; btnAll.PerformClick(); //Thread.Sleep(2000); //processThread.Abort(); /// //cbbColumns_Load(KhachHang.ColumnNames()); }
private void Customerfrm_Load(object sender, EventArgs e) { //new da truyen tu frm me thi khoi load if (listOrder == null) { listOrder = new List <Chuyen>(); } if (ListTours == null) { ListTours = new ToursList(); } if (ListTrips == null) { ListTrips = new Trips(); } if (ListCus == null) { ListCus = new CusList(); } if (ListOrd == null) { ListOrd = new OrderList(); } tvTours_Load(ListTours.FindByStatus("Đang mở")); if (Code != null) { btnAdd.Enabled = false; btnAdd.Visible = false; controls_BindData(ListCus.Single(Code)); } else { btnUpdate.Visible = false; txtCode.Text = NewBestIDCustomer(); Code = txtCode.Text; } }