示例#1
0
        private void btnQueryOut_Click(object sender, EventArgs e)
        {
            switch (cmbQueryOut.SelectedIndex)
            {
            case 0:    //全部
                VisitorAccessManagementBindingSource.DataSource = VisitorsAccessManagementService.GetAll();
                break;

            case 1:    //按姓名查询
                VisitorAccessManagementBindingSource.DataSource = VisitorsAccessManagementService.QueryByName(txtQueryOut.Text);
                break;

            case 2:    //按日期查询
                VisitorAccessManagementBindingSource.DataSource = VisitorsAccessManagementService.QueryByDate(DateTime.Parse(txtQueryOut.Text));
                break;

            default:
                break;
            }
            VisitorAccessManagementBindingSource.ResetBindings(true);
        }
示例#2
0
 private void VisitorQueryALL()
 {
     VisitorAccessManagementBindingSource.DataSource = VisitorsAccessManagementService.GetAll();
     VisitorAccessManagementBindingSource.ResetBindings(false);
 }