Ejemplo n.º 1
0
        private void BindGrid()
        {
            NoticeBLL noticeBLL = new NoticeBLL();
            DateTime  start     = new DateTime(2000, 1, 1);
            DateTime  end       = new DateTime(2100, 12, 31);

            if (dateBeginTime.DateValue.ToString() != string.Empty)
            {
                start = DateTime.Parse(dateBeginTime.DateValue.ToString());
            }
            if (dateEndTime.DateValue.ToString() != string.Empty)
            {
                end = DateTime.Parse(dateEndTime.DateValue.ToString());
            }

            IList <RailExam.Model.Notice> notices =
                noticeBLL.GetNotices(txtTitle.Text, int.Parse(ddlImportanceName.SelectedValue),
                                     txtOrgName.Text, txtEmployeeName.Text, start, end, PrjPub.CurrentLoginUser.IsAdmin, PrjPub.CurrentLoginUser.EmployeeID);

            if (notices != null)
            {
                Grid1.DataSource = notices;
                Grid1.DataBind();
            }
        }