コード例 #1
0
 private void btnSearch_Click(object sender, EventArgs e)
 {
     using (frmSearchUser frmSearch = new frmSearchUser())
     {
         if (frmSearch.ShowDialog() == DialogResult.OK)
         {
             GridUser.DataSource = ListUserController.GetListSearch(frmSearch.tbUserName.Text,
                                                                    frmSearch.tbFullName.Text, frmSearch.tbDay.Text,
                                                                    frmSearch.tbMonth.Text, frmSearch.tbYear.Text);
         }
     }
 }
コード例 #2
0
 private void tbSearch_TextChanged(object sender, EventArgs e)
 {
     if ((tbSearch.Text == "") || (tbSearch is null))
     {
         GridTask.DataSource = TaskController.GetListTask();
         return;
     }
     else
     {
         GridTask.DataSource = ListUserController.GetTaskSearch(tbSearch.Text);
     }
 }
コード例 #3
0
        public frmRecent()
        {
            InitializeComponent();
            cTaskID.DataPropertyName      = nameof(Models.Task.ID);
            cTaskName.DataPropertyName    = nameof(Models.Task.title);
            cDescription.DataPropertyName = nameof(Models.Task.description);
            cFrom.DataPropertyName        = nameof(Models.Task.fromDate);
            cTo.DataPropertyName          = nameof(Models.Task.toDate);
            cTiendo.DataPropertyName      = nameof(Models.Task.tienDo);
            var day = DateTime.Now;

            GridRecent.DataSource         = ListUserController.GetTaskSearchRecent(day);
            GridRecent.Columns[5].Visible = false;
        }