예제 #1
0
 protected void gvEmpStdSubAllocationDetails_RowCreated(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.Pager)
     {
         GridViewOperations GrvOperation = new GridViewOperations();
         GrvOperation.SetPagerButtonStates(gvSchoolRegistrationBMSdetail, e.Row, this.Page);
     }
 }
 protected void GvUserList_RowCreated(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.Pager)
     {
         GridViewOperations GrvOperation = new GridViewOperations();
         GrvOperation.SetPagerButtonStates(this.GvUserList, e.Row, this.Page);
     }
 }
예제 #3
0
 protected void gvAnnouncementDetails_RowCreated(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.Pager)
     {
         GridViewOperations GrvOperation = new GridViewOperations();
         GrvOperation.SetPagerButtonStates(this.gvAnnouncementDetails, e.Row, this.Page);
     }
 }
 protected void GrvSYS_Districtdetail_RowCreated(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.Pager)
     {
         GridViewOperations GrvOperation = new GridViewOperations();
         GrvOperation.SetPagerButtonStates(grvSYS_Districtdetail, e.Row, this.Page);
     }
 }
    private void BindPostGrid()
    {
        oForum     = new Forum();
        oForum_BAL = new Forum_BAL();

        DataSet ods = oForum_BAL.Forum_Select_All(oForum);

        GridViewOperations GrvOperation = new GridViewOperations();

        GrvOperation.BindGridWithSorting(this.GvPost, ods, this.SortField, this.SortDirection);
    }
예제 #6
0
    private void BindAdmissionGrid(string status)
    {
        oAdmission        = new Admission();
        oAdmission_BLogic = new Admission_BLogic();

        DataSet ods = oAdmission_BLogic.Admission_Select_ByInteraction(DateTime.Now, DateTime.Now);

        GridViewOperations GrvOperation = new GridViewOperations();

        GrvOperation.BindGridWithSorting(this.GvAdmission, ods, this.SortField, this.SortDirection);
    }
예제 #7
0
    private void bindgrvSYS_Countrydetail()
    {
        SYS_Country     = new SYS_Country();
        BAL_SYS_Country = new SYS_Country_BLogic();

        DataSet dsSelect = new DataSet();

        dsSelect = BAL_SYS_Country.BAL_SYS_Country_Select(SYS_Country, "SelectAll");
        if (dsSelect.Tables.Count > 0)
        {
            string searchCondition = string.Empty;
            if (txtCountrySearch.Text != string.Empty)
            {
                searchCondition = "Country like '%" + txtCountrySearch.Text + "%'";
            }

            if (rlstActive.SelectedValue == "0")
            {
                if (searchCondition != string.Empty)
                {
                    searchCondition = searchCondition + " and ";
                }

                searchCondition = searchCondition + " IsActive = 0";
            }
            else if (rlstActive.SelectedValue == "1")
            {
                if (searchCondition != string.Empty)
                {
                    searchCondition = searchCondition + " and ";
                }

                searchCondition = searchCondition + " IsActive = 1";
            }

            DataView dv = new DataView(dsSelect.Tables[0]);
            dv.RowFilter = searchCondition;

            DataSet dsSelectSub = new DataSet();
            dsSelectSub.Tables.Add(dv.ToTable());

            GridViewOperations GrvOperation = new GridViewOperations();
            GrvOperation.BindGridWithSorting(grvSYS_Countrydetail, dsSelectSub, this.SortField, this.SortDirection);
        }
        else
        {
            grvSYS_Countrydetail.DataSource = null;
            grvSYS_Countrydetail.DataBind();
        }
    }
예제 #8
0
    private void bindgrvSchoolRegistrationBMSdetail(int SchRegID)
    {
        try
        {
            DataSet dsSelect = new DataSet();
            dsSelect = GetClassRecord(dsSelect, SchRegID);

            if (dsSelect.Tables.Count > Convert.ToInt32(EnumFile.AssignValue.Zero))
            {
                string st = Session["TypeofPageView"].ToString();

                if (Session["TypeofPageView"].ToString() == "DetailsOnly")
                {
                    tdActDe.Style.Add("display", "none");
                    tdApproveReject.Style.Add("display", "none");
                    btnUpdate.Style.Add("display", "none");
                    txtSchName.Enabled            = false;
                    txtValSchAddress.Enabled      = false;
                    txtValPloatNo.Enabled         = false;
                    txtValBlockNoSurvey.Enabled   = false;
                    txtValCity.Enabled            = false;
                    txtValPincode.Enabled         = false;
                    txtValFaxNo.Enabled           = false;
                    txtValMobileNo.Enabled        = false;
                    txtValLandline.Enabled        = false;
                    txtValSchoolStartYear.Enabled = false;
                    txtValSchlWebsite.Enabled     = false;
                    txtValSchlMailID.Enabled      = false;

                    gvSchoolRegistrationBMSdetail.Columns[0].Visible = false;
                }
                else
                {
                }

                GridViewOperations GrvOperation = new GridViewOperations();
                GrvOperation.BindGridWithSorting(gvSchoolRegistrationBMSdetail, dsSelect, this.SortField, this.SortDirection);
            }
            else
            {
                GridViewOperations GrvOperation = new GridViewOperations();
                GrvOperation.BindGridWithSorting(gvSchoolRegistrationBMSdetail, null, this.SortField, this.SortDirection);
            }
        }
        catch (Exception ex)
        {
            WebMsg.Show(ex.Message);
        }
    }
예제 #9
0
 protected void grvSYS_Chapterdetail_RowCreated(object sender, GridViewRowEventArgs e)
 {
     try
     {
         if (e.Row.RowType == DataControlRowType.Pager)
         {
             GridViewOperations GrvOperation = new GridViewOperations();
             GrvOperation.SetPagerButtonStates(grvSYS_Chapterdetail, e.Row, this.Page);
         }
     }
     catch (Exception ex)
     {
         WebMsg.Show(ex.Message);
     }
 }
예제 #10
0
 protected void grvEmpStdSubAllocationDetails_RowCreated(object sender, GridViewRowEventArgs e)
 {
     try
     {
         if (e.Row.RowType == DataControlRowType.Pager)
         {
             GridViewOperations GrvOperation = new GridViewOperations();
             GrvOperation.SetPagerButtonStates(this.GvUserList, e.Row, this.Page);
         }
     }
     catch (Exception ex)
     {
         WebMsg.Show(ex.Message);
     }
 }
예제 #11
0
    protected void grvStudentdetail_Sorting(object sender, GridViewSortEventArgs e)
    {
        if (e.SortExpression.Trim() == this.SortField)
        {
            this.SortDirection = (this.SortDirection == "descending" ? "ascending" : "descending");
        }
        else
        {
            this.SortDirection = "ascending";
        }
        this.SortField = e.SortExpression;
        GridViewOperations GrvOperation = new GridViewOperations();

        GrvOperation.GrvSortingSetImage(e, grvStudentdetail, this.SortDirection);
    }
예제 #12
0
 protected void grdClassroomWiseAttendance_RowCreated(object sender, GridViewRowEventArgs e)
 {
     try
     {
         if (e.Row.RowType == DataControlRowType.Pager)
         {
             GridViewOperations GrvOperation = new GridViewOperations();
             GrvOperation.SetPagerButtonStates(grdAttendance, e.Row, this.Page);
         }
     }
     catch (Exception ex)
     {
         WebMsg.Show(ex.Message);
     }
 }
예제 #13
0
    protected void grTestResult_RowCreated(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.Pager)
        {
            GridViewOperations GrvOperation = new GridViewOperations();
            GrvOperation.SetPagerButtonStates(grTestResult, e.Row, this.Page);
        }
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            // when mouse is over the row, save original color to new attribute, and change it to highlight color
            e.Row.Attributes.Add("onmouseover", "this.originalstyle=this.style.backgroundColor;this.style.backgroundColor='#95DDDD';this.style.cursor='pointer'");

            // when mouse leaves the row, change the bg color to its original value
            e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=this.originalstyle;");
        }
    }
예제 #14
0
    protected void gvEmployeeDetails_Sorting(object sender, GridViewSortEventArgs e)
    {
        if (e.SortExpression.Trim() == this.SortField)
        {
            this.SortDirection = (this.SortDirection == "descending" ? "ascending" : "descending");
        }
        else
        {
            this.SortDirection = "ascending";
        }

        this.SortField = e.SortExpression;
        this.BindGridEmployeeDetails();
        GridViewOperations GrvOperation = new GridViewOperations();

        GrvOperation.GrvSortingSetImage(e, this.gvEmployeeDetails, this.SortDirection);
    }
예제 #15
0
    protected void grvReschedulingData_Sorting(object sender, GridViewSortEventArgs e)
    {
        if (e.SortExpression.Trim() == this.SortField)
        {
            this.SortDirection = (this.SortDirection == "descending" ? "ascending" : "descending");
        }
        else
        {
            this.SortDirection = "ascending";
            this.SortField     = e.SortExpression;
            Applied_Chapter_Topics();
        }

        GridViewOperations GrvOperation = new GridViewOperations();

        GrvOperation.GrvSortingSetImage(e, grvReschedulingData, this.SortDirection);
    }
예제 #16
0
    /// <summary>
    /// <Description>Bind Announcement Grid with all Announcement Details</Description>
    /// </summary>
    protected void BindGridAnnouncement()
    {
        DataSet dsSelect = new DataSet();

        dsSelect = this.BAL_Announcement.BAL_SelectAnnouncementBySchoolID(Convert.ToInt32(this.Session["SchoolID"]), "SelectAll");
        gvAnnouncementDetails.DataSource = dsSelect;
        if (dsSelect.Tables.Count > ((int)EnumFile.AssignValue.Zero))
        {
            GridViewOperations GvOperation = new GridViewOperations();
            GvOperation.BindGridWithSorting(this.gvAnnouncementDetails, dsSelect, this.SortField, this.SortDirection);
        }
        else
        {
            gvAnnouncementDetails.DataSource = null;
            gvAnnouncementDetails.DataBind();
        }
    }
예제 #17
0
    private void BindGrvResultDetails()
    {
        DataSet          ds             = new DataSet();
        ReportsForResult objRsultReport = new ReportsForResult();

        ds = objRsultReport.BAL_SYS_ResultClassroomwise_Select(Convert.ToInt32(ddlSchool.SelectedValue), Convert.ToInt32(ddlBoard.SelectedValue), Convert.ToInt32(ddlMedium.SelectedValue), Convert.ToInt32(ddlStandard.SelectedValue), Convert.ToInt32(ddlsubject.SelectedValue), Convert.ToInt32(ddlchapter.SelectedValue), Convert.ToInt32(ddltopic.SelectedValue), Convert.ToDateTime(txtfromdate.Text), Convert.ToDateTime(txttodate.Text));

        if (ds.Tables.Count > 0)
        {
            GridViewOperations GrvOperation = new GridViewOperations();
            GrvOperation.BindGridWithSorting(GrvResultDetails, ds, this.SortField, this.SortDirection);
        }
        else
        {
            GrvResultDetails.DataSource = null;
            GrvResultDetails.DataBind();
        }
    }
예제 #18
0
    protected void grTestResult_Sorting(object sender, GridViewSortEventArgs e)
    {
        if (e.SortExpression.Trim() == this.SortField)
        {
            this.SortDirection = (this.SortDirection == "descending" ? "ascending" : "descending");
        }
        else
        {
            this.SortDirection = "ascending";
            this.SortField     = e.SortExpression;
            int index = Convert.ToInt32(menuTestType.SelectedValue);
            BindGridData(index);
        }

        GridViewOperations GrvOperation = new GridViewOperations();

        GrvOperation.GrvSortingSetImage(e, grTestResult, this.SortDirection);
    }
예제 #19
0
    protected void gvEmpStdSubAllocationDetails_Sorting(object sender, GridViewSortEventArgs e)
    {
        if (e.SortExpression.Trim() == this.SortField)
        {
            this.SortDirection = (this.SortDirection == "descending" ? "ascending" : "descending");
        }
        else
        {
            this.SortDirection = "ascending";
        }

        this.SortField = e.SortExpression;

        this.SortField = e.SortExpression;
        bindgrvSchoolRegistrationBMSdetail(Convert.ToInt32(ViewState["SchRegID"].ToString()));

        GridViewOperations GrvOperation = new GridViewOperations();

        GrvOperation.GrvSortingSetImage(e, gvSchoolRegistrationBMSdetail, this.SortDirection);
    }
    private void BindAdmissionGrid(string status)
    {
        oAdmission        = new Admission();
        oAdmission_BLogic = new Admission_BLogic();

        oAdmission.LastAdmissionStatus = (!string.IsNullOrEmpty(status)) ? status : null;

        DataSet ods = oAdmission_BLogic.Admission_Select_All(oAdmission);

        ViewState["ExportExcel"] = ods;

        GridViewOperations GrvOperation = new GridViewOperations();

        GrvOperation.BindGridWithSorting(this.GvAdmission, ods, this.SortField, this.SortDirection);

        if (ods.Tables[0].Rows.Count == 0)
        {
            dvExcel.Visible = false;
        }
    }
    public void BindGrid()
    {
        obj_SYS_Chapter     = new SYS_Chapter();
        obj_BAL_SYS_Chapter = new SYS_Chapter_BLogic();

        obj_SYS_Chapter.bmsid     = Convert.ToInt64(ViewState["BMSID"]);
        obj_SYS_Chapter.subjectid = Convert.ToInt16(ddlSubject.SelectedValue);

        DataSet ds = obj_BAL_SYS_Chapter.BAL_SYS_ChapterSeq_Select(obj_SYS_Chapter);

        GridViewOperations GrvOperation = new GridViewOperations();

        GrvOperation.BindGridWithSorting(grdChapter, ds, this.SortField, this.SortDirection);

        //if (ds.Tables.Count > 0)
        //{
        //    grdChapter.DataSource = ds;
        //    grdChapter.DataBind();
        //}
    }
 protected void grdClassroomWiseAttendance_Sorting(object sender, GridViewSortEventArgs e)
 {
     try
     {
         if (e.SortExpression.Trim() == this.SortField)
         {
             this.SortDirection = (this.SortDirection == "descending" ? "ascending" : "descending");
         }
         else
         {
             this.SortDirection = "ascending";
         }
         this.SortField = e.SortExpression;
         BindClassWiseAttendanceGrid();
         GridViewOperations GrvOperation = new GridViewOperations();
         GrvOperation.GrvSortingSetImage(e, grdClassroomWiseAttendance, this.SortDirection);
     }
     catch (Exception ex)
     {
         WebMsg.Show(ex.Message);
     }
 }
예제 #23
0
 protected void GrvResultDetails_Sorting(object sender, GridViewSortEventArgs e)
 {
     try
     {
         if (e.SortExpression.Trim() == this.SortField)
         {
             this.SortDirection = (this.SortDirection == "descending" ? "ascending" : "descending");
         }
         else
         {
             this.SortDirection = "ascending";
         }
         this.SortField = e.SortExpression;
         BindGrvResultDetails();
         GridViewOperations GrvOperation = new GridViewOperations();
         GrvOperation.GrvSortingSetImage(e, GrvResultDetails, this.SortDirection);
     }
     catch (Exception ex)
     {
         WebMsg.Show(ex.Message);
     }
 }
예제 #24
0
    protected void GrvResultDetails_RowCreated(object sender, GridViewRowEventArgs e)
    {
        try
        {
            if (e.Row.RowType == DataControlRowType.Pager)
            {
                GridViewOperations GrvOperation = new GridViewOperations();
                GrvOperation.SetPagerButtonStates(GrvResultDetails, e.Row, this.Page);
            }
            if (e.Row.RowType == System.Web.UI.WebControls.DataControlRowType.DataRow)
            {
                e.Row.Attributes.Add("onmouseover", "this.originalstyle=this.style.backgroundColor;this.style.backgroundColor='#95DDDD';this.style.cursor='pointer'");

                // when mouse leaves the row, change the bg color to its original value
                e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=this.originalstyle;");
            }
        }
        catch (Exception ex)
        {
            WebMsg.Show(ex.Message);
        }
    }
예제 #25
0
    protected void grvSYS_Chapterdetail_Sorting(object sender, GridViewSortEventArgs e)
    {
        try
        {
            if (e.SortExpression.Trim() == this.SortField)
            {
                this.SortDirection = (this.SortDirection == "descending" ? "ascending" : "descending");
            }
            else
            {
                this.SortDirection = "ascending";
                this.SortField     = e.SortExpression;
                bindgrvSYS_Chapterdetail();
            }

            GridViewOperations GrvOperation = new GridViewOperations();
            GrvOperation.GrvSortingSetImage(e, grvSYS_Chapterdetail, this.SortDirection);
        }
        catch (Exception ex)
        {
            WebMsg.Show(ex.Message);
        }
    }
    protected void grdClassroomWiseAttendance_RowCreated(object sender, GridViewRowEventArgs e)
    {
        try
        {
            if (e.Row.RowType == DataControlRowType.Pager)
            {
                GridViewOperations GrvOperation = new GridViewOperations();
                GrvOperation.SetPagerButtonStates(grdClassroomWiseAttendance, e.Row, this.Page);
            }
            if (e.Row.RowType == System.Web.UI.WebControls.DataControlRowType.DataRow)
            {
                // when mouse is over the row, save original color to new attribute, and change it to highlight color
                e.Row.Attributes.Add("onmouseover", "this.originalstyle=this.style.backgroundColor;this.style.backgroundColor='#95DDDD';this.style.cursor='pointer'");

                // when mouse leaves the row, change the bg color to its original value
                e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=this.originalstyle;");
            }
        }
        catch (Exception ex)
        {
            WebMsg.Show(ex.Message);
        }
    }
예제 #27
0
    protected void grvEmpStdSubAllocationDetails_Sorting(object sender, GridViewSortEventArgs e)
    {
        try
        {
            if (e.SortExpression.Trim() == this.SortField)
            {
                this.SortDirection = this.SortDirection == "descending" ? "ascending" : "descending";
            }
            else
            {
                this.SortDirection = "ascending";
            }

            this.SortField = e.SortExpression;
            this.BindGridData();

            GridViewOperations GrvOperation = new GridViewOperations();
            GrvOperation.GrvSortingSetImage(e, this.GvUserList, this.SortDirection);
        }
        catch (Exception ex)
        {
            WebMsg.Show(ex.Message);
        }
    }
예제 #28
0
    private void bindgrvSYS_BMSdetail()
    {
        SYS_BMS          = new SYS_BMS();
        this.BAL_SYS_BMS = new SYS_BMS_BLogic();

        DataSet dsSelect = new DataSet();

        dsSelect = this.BAL_SYS_BMS.BAL_SYS_BMS_Select(SYS_BMS, "SelectAll");
        if (dsSelect.Tables.Count > 0)
        {
            string searchCondition = string.Empty;

            if (txtBoardSearch.Text != string.Empty)
            {
                searchCondition = "Board like '%" + txtBoardSearch.Text + "%'";
            }

            if (txtMediumSearch.Text != string.Empty)
            {
                if (searchCondition != string.Empty)
                {
                    searchCondition = searchCondition + " and ";
                }

                searchCondition = "Medium like '%" + txtMediumSearch.Text + "%'";
            }

            if (txtStandardSearch.Text != string.Empty)
            {
                if (searchCondition != string.Empty)
                {
                    searchCondition = searchCondition + " and ";
                }

                searchCondition = "Standard like '%" + txtStandardSearch.Text + "%'";
            }

            if (rlstActive.SelectedValue == "0")
            {
                if (searchCondition != string.Empty)
                {
                    searchCondition = searchCondition + " and ";
                }

                searchCondition = searchCondition + "IsSemester ='No'";
            }
            else if (rlstActive.SelectedValue == "1")
            {
                if (searchCondition != string.Empty)
                {
                    searchCondition = searchCondition + " and ";
                }

                searchCondition = searchCondition + "IsSemester ='Yes'";
            }

            DataView dv = new DataView(dsSelect.Tables[0]);
            dv.RowFilter = searchCondition;

            DataSet dsSelectSub = new DataSet();
            dsSelectSub.Tables.Add(dv.ToTable());

            GridViewOperations GrvOperation = new GridViewOperations();
            GrvOperation.BindGridWithSorting(grvSYS_BMSdetail, dsSelectSub, this.SortField, this.SortDirection);
        }
        else
        {
            grvSYS_BMSdetail.DataSource = null;
            grvSYS_BMSdetail.DataBind();
        }
    }
예제 #29
0
    protected void BindGridEmployeeDetails()
    {
        DataSet dsSelect        = new DataSet();
        string  SearchCondition = string.Empty;

        if (pnlSearch.CssClass == "Visible")
        {
            if (txtSearchFirstName.Text != string.Empty)
            {
                SearchCondition = "and Employee.FirstName like '%" + txtSearchFirstName.Text + "%'";
            }

            if (txtSearchMiddleName.Text != string.Empty)
            {
                SearchCondition = SearchCondition + "and Employee.MiddleName like '%" + txtSearchMiddleName.Text + "%'";
            }

            if (txtSearchLastName.Text != string.Empty)
            {
                SearchCondition = SearchCondition + "and Employee.LastName like '%" + txtSearchLastName.Text + "%'";
            }

            if (txtSearchDOB.Text != string.Empty)
            {
                SearchCondition = SearchCondition + "and Employee.DateOfBirth = '" + txtSearchDOB.Text + "'";
            }

            if (rlstSearchGender.SelectedValue != string.Empty)
            {
                SearchCondition = SearchCondition + "and Employee.Gender = '" + rlstSearchGender.SelectedValue + "'";
            }

            if (txtSearchBloodGroup.Text != string.Empty)
            {
                SearchCondition = SearchCondition + "and Employee.BloodGroup like '%" + txtSearchBloodGroup.Text + "%'";
            }

            if (txtSearchQualification.Text != string.Empty)
            {
                SearchCondition = SearchCondition + "and Employee.Qualification like '%" + txtSearchQualification.Text + "%'";
            }

            if (txtSearchDesignation.Text != string.Empty)
            {
                SearchCondition = SearchCondition + "and Employee.Designation like '%" + txtSearchDesignation.Text + "%'";
            }
            if (rlstActive.SelectedValue == "0")
            {
                SearchCondition = SearchCondition + SearchCondition + "and IsActive=0";
            }
            else if (rlstActive.SelectedValue == "1")
            {
                SearchCondition = SearchCondition + SearchCondition + "and IsActive=1";
            }
        }


        dsSelect = this.BAL_Employee.BAL_EmployeeDetailsBySchoolID(Convert.ToInt32(this.Session["SchoolID"]), SearchCondition);

        if (dsSelect.Tables[0].Rows.Count > ((int)EnumFile.AssignValue.Zero))
        {
            GridViewOperations GvOperation = new GridViewOperations();
            GvOperation.BindGridWithSorting(this.gvEmployeeDetails, dsSelect, this.SortField, this.SortDirection);
            int row = dsSelect.Tables[0].Rows.Count;
            ViewState["EmployeeID"] = dsSelect.Tables[0].Rows[row - 1]["EmployeeID"];
        }
        else
        {
            gvEmployeeDetails.DataSource = null;
            gvEmployeeDetails.DataBind();
        }
    }
예제 #30
0
    protected void BindGridAnnouncementDetails()
    {
        DataSet dsSelect        = new DataSet();
        string  SearchCondition = string.Empty;

        ////if (Convert.ToInt32(ddlBoardMediumStandard.SelectedValue) > 0)
        ////{
        SearchCondition = "and Announcement.BMSID = " + ddlBoardMediumStandard.SelectedValue;
        ////}

        int    count          = (int)EnumFile.AssignValue.Zero;
        string divisionIDList = string.Empty;

        foreach (ListItem chk in clstDivision.Items)
        {
            if (chk.Selected == true)
            {
                if (count == (int)EnumFile.AssignValue.Zero)
                {
                    divisionIDList = chk.Value.ToString();
                }
                else
                {
                    divisionIDList = divisionIDList + " , " + chk.Value.ToString();
                }

                count = count + 1;
            }
        }

        if (count > ((int)EnumFile.AssignValue.Zero))
        {
            SearchCondition = SearchCondition + " and Announcement.DivisionID IN (" + divisionIDList + ") ";
        }

        if (txtSearchAnnouncement.Text != string.Empty)
        {
            SearchCondition = SearchCondition + " and Announcement like '%" + txtSearchAnnouncement.Text + "%'";
        }

        if (txtStartDate.Text != string.Empty || txtEndDate.Text != string.Empty)
        {
            if (txtStartDate.Text != string.Empty && txtEndDate.Text != string.Empty)
            {
                SearchCondition = SearchCondition + " and Announcement.StartDate between '" + txtStartDate.Text + "'and '" + txtEndDate.Text + "'";
            }
            else if (txtStartDate.Text != string.Empty)
            {
                SearchCondition = SearchCondition + " and Announcement.StartDate = '" + txtStartDate.Text + "'";
            }
            else if (txtEndDate.Text != string.Empty)
            {
                SearchCondition = SearchCondition + " and Announcement.EndDate = '" + txtEndDate.Text + "'";
            }
        }

        dsSelect = this.BAL_Announcement.BAL_SelectAnnouncementBySchoolID1(Convert.ToInt32(this.Session["SchoolID"]), SearchCondition);
        if (dsSelect.Tables.Count > ((int)EnumFile.AssignValue.Zero))
        {
            GridViewOperations GvOperation = new GridViewOperations();
            GvOperation.BindGridWithSorting(this.gvAnnouncementDetails, dsSelect, this.SortField, this.SortDirection);
        }
        else
        {
            gvAnnouncementDetails.DataSource = null;
            gvAnnouncementDetails.DataBind();
        }
    }