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); } }
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); }
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); }
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(); } }
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); } }
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); } }
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); } }
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); }
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); } }
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;"); } }
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); }
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); }
/// <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(); } }
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(); } }
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); }
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); } }
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); } }
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); } }
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); } }
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); } }
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(); } }
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(); } }
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(); } }