Exemple #1
0
        private void btnQuery_Click(object sender, EventArgs e)
        {
            switch (cmbQuery.SelectedIndex)
            {
            case 0:    //全部
                ResidentAccessManagementBindingSource.DataSource = ResidentsAccessManagementService.GetAll();
                break;

            case 1:    //按编号查询
                ResidentAccessManagementBindingSource.DataSource = ResidentsAccessManagementService.QueryByResidentID(txtQuery.Text);
                break;

            case 2:    //按日期查询
                ResidentAccessManagementBindingSource.DataSource = ResidentsAccessManagementService.QueryByDate(DateTime.Parse(txtQuery.Text));
                break;

            default: break;
            }
            ResidentAccessManagementBindingSource.ResetBindings(true);
        }
Exemple #2
0
 private void ResidentQueryALL()
 {
     ResidentAccessManagementBindingSource.DataSource = ResidentsAccessManagementService.GetAll();
     ResidentAccessManagementBindingSource.ResetBindings(false);
 }