Пример #1
0
 private void btnClear_Click(object sender, EventArgs e)
 {
     iCustomerId          = null;
     txtSearch.Text       = string.Empty;
     customers            = db.Customers;
     customer             = new Customer();
     dgDetails.DataSource = customers;
     AniHelper.PanelClearMethod(pnlCustomer);
     AniHelper.FillCombo(cmbSlot, db.Slots.Where(x => x.OccupaidStatus == false).ToList().Cast <object>().ToList());
     AniHelper.FillCombo(cmbStaff, db.Staffs.Where(x => x.Name != "Admin").ToList().Cast <object>().ToList());
     btnInOrOut.Visible = false;
     txtSearch.Focus();
 }
Пример #2
0
        private void txtSearch_TextChanged(object sender, EventArgs e)
        {
            dgDetails.DataSource  = null;
            dgvReports.DataSource = null;
            AniHelper.PanelClearMethod(pnlCustomer);
            if (txtSearch.Text == string.Empty)
            {
                return;
            }
            List <Customer> exCustomers = new List <Customer>();

            exCustomers = ORMForSDF.GetList_SP <Customer>("spGetMainCusomers", new { sText = txtSearch.Text }, Properties.Settings.Default.Connection);

            if (exCustomers.Count > 0)
            {
                dgDetails.AutoGenerateColumns = false;
                dgDetails.DataSource          = exCustomers;
                customer = exCustomers.FirstOrDefault();
                CustomerLoadMethod();
                GenerateReports(txtSearch.Text);
            }
        }