private void BindCategory() { DataSet dsCategoryMasterList = CCategorymasterServices.CategorymasterList(); GVReport.DataSource = dsCategoryMasterList; GVReport.DataBind(); }
public void BindgvProductlist() { DataSet dsProductMasterList = CProductMasterServices.ProductMasterList(); GVReport.DataSource = dsProductMasterList; GVReport.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { user = (clsUser)Session["User"]; if (!IsPostBack) { hidUniID.Value = Classes.clsGetSettings.UniversityID.ToString(); DataTable dt = clsCollegeAdmissionReports.GetAcademicYear(); YCMOU.hidTerms.Value = string.Empty; } if (user.UserTypeCode == "2") { instIDs = user.UserReferenceID; hidInstID.Value = instIDs.ToString(); YCMOU.IsCollegeLogin = true; hidCollName.Value = user.Name; lblAcaYear.Text = hidCollName.Value; } YCMOU.isDiscRpt.Value = "Yes"; YCMOU.IsReportUserAndDateDisplay = false; YCMOU.IsInstituteDisplay = false; YCMOU.OnProceedClick += btnNext_Click; YCMOU.OnPartChange += ddlCrPrDetailsDesc_SelectedIndexChanged; YCMOU.IsCourseTermDisply = false; hid_AcademicYear.Value = ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text; hid_fk_AcademicYr_ID.Value = ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue; tblExportedDataMsg.Style.Add("display", "none"); #region Back Navigation if (Page.PreviousPage != null) { if (Request.QueryString["Navigate"] == "back") { HideSearchCriteria(); ContentPlaceHolder CnDet = (ContentPlaceHolder)Page.PreviousPage.Master.FindControl("ContentPlaceHolder1"); hidFacName.Value = ((HtmlInputHidden)CnDet.FindControl("hidFacName")).Value; hidCrName.Value = ((HtmlInputHidden)CnDet.FindControl("hidCrName")).Value; hidBrName.Value = ((HtmlInputHidden)CnDet.FindControl("hidBrName")).Value; hidCrPrDetName.Value = ((HtmlInputHidden)CnDet.FindControl("hidCrPrDetName")).Value; hidCrPrChName.Value = ((HtmlInputHidden)CnDet.FindControl("hidCrPrChName")).Value; hidCrPrName.Value = ((HtmlInputHidden)CnDet.FindControl("hidCrPrName")).Value; hidRCName.Value = ((HtmlInputHidden)CnDet.FindControl("hidRCName")).Value; hidRCID.Value = ((HtmlInputHidden)CnDet.FindControl("hidRCID")).Value; string courseOrColl = string.Empty; if (hidRCID.Value != string.Empty) { DT = clsCollegeAdmissionReports.FillDiscrepancyReport(Request.QueryString["AcYrId"].ToString(), hidInstID.Value, Request.QueryString["FacId"].ToString(), Request.QueryString["CrId"].ToString(), Request.QueryString["MoLrnId"].ToString(), Request.QueryString["PtrnId"].ToString(), Convert.ToString(Session["BranchID"]), Convert.ToString(Session["pk_CrPr_Details_ID"]), Convert.ToString(Session["crprchids"]), hidRCID.Value); } else { DT = clsCollegeAdmissionReports.FillDiscrepancyReport(Request.QueryString["AcYrId"].ToString(), hidInstID.Value, Request.QueryString["FacId"].ToString(), Request.QueryString["CrId"].ToString(), Request.QueryString["MoLrnId"].ToString(), Request.QueryString["PtrnId"].ToString(), Convert.ToString(Session["BranchID"]), Convert.ToString(Session["pk_CrPr_Details_ID"]), Convert.ToString(Session["crprchids"]), null); } Session["DdtData"] = DT; if (DT.Rows.Count > 0) { GVReport.DataSource = DT; GVReport.DataBind(); GVReport.Style.Add("display", "block"); string RegCentreName = string.Empty; if (((RadioButton)YCMOU.FindControl("ChkSelectedRegionalCenter")).Checked) { RegCentreName = ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedItem.Text; courseOrColl = " for " + hidFacName.Value + " - " + hidCrName.Value + " - " + hidBrName.Value + " - " + hidCrPrDetName.Value + " - " + hidCrPrChName.Value + " for Regional Center " + RegCentreName; } else { courseOrColl = " for " + hidFacName.Value + " - " + hidCrName.Value + " - " + hidBrName.Value + " - " + hidCrPrDetName.Value + " - " + hidCrPrChName.Value + " for All Regional Centers "; } lblAcaYear.Text = courseOrColl + " [Academic Year " + Request.QueryString["AcYrName"].ToString() + "]"; } if (DT != null) { DT = null; } } } #endregion }
protected void btnNext_Click(object sender, EventArgs e) { string courseOrColl = string.Empty; string collName = string.Empty; if (user.UserTypeCode != "2") { hidInstID.Value = string.Empty; hidCollName.Value = string.Empty; } hidFacName.Value = string.Empty; hidCrName.Value = string.Empty; hidBrName.Value = string.Empty; hidCrPrDetName.Value = string.Empty; hidCrPrChName.Value = string.Empty; hidCrPrChIds.Value = string.Empty; hidCrPrChNames.Value = string.Empty; Session.Remove("Ddtdata"); try { hidFacID.Value = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedValue; getFacCrMoLrnPtrnID(); hidCrPrDetailsID.Value = ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedValue; hidCrPrChID.Value = ((CheckBoxList)YCMOU.FindControl("chkChild")).SelectedValue; //**************************************************************** if (YCMOU.IsRegionalCenterLogin == "True") { hidInstID.Value = string.Empty; DT = clsCollegeAdmissionReports.FillDiscrepancyReport(((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue, hidInstID.Value, hidFacID.Value, hidCrID.Value, hidMoLrnID.Value, hidPtrnID.Value, Convert.ToString(Session["BranchID"]), Convert.ToString(Session["pk_CrPr_Details_ID"]), YCMOU.hidCrPrChIds.Value, user.UserReferenceID); } //**************************************************************** else if (hidInstID.Value.Equals(string.Empty)) { if (((RadioButton)YCMOU.FindControl("ChkSelectedRegionalCenter")).Checked) { if (((DropDownList)YCMOU.FindControl("ddlStudyCenter")).SelectedIndex != 0) { DT = clsCollegeAdmissionReports.FillDiscrepancyReport(((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue, hidFacID.Value, hidCrID.Value, hidMoLrnID.Value, hidPtrnID.Value, Convert.ToString(Session["BranchID"]), Convert.ToString(Session["pk_CrPr_Details_ID"]), YCMOU.hidCrPrChIds.Value, ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedValue, ((DropDownList)YCMOU.FindControl("ddlStudyCenter")).SelectedValue.Split('|')[0]); } else { DT = clsCollegeAdmissionReports.FillDiscrepancyReport(((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue, hidInstID.Value, hidFacID.Value, hidCrID.Value, hidMoLrnID.Value, hidPtrnID.Value, Convert.ToString(Session["BranchID"]), Convert.ToString(Session["pk_CrPr_Details_ID"]), YCMOU.hidCrPrChIds.Value, ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedValue); } } else { DT = clsCollegeAdmissionReports.FillDiscrepancyReport(((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue, hidInstID.Value, hidFacID.Value, hidCrID.Value, hidMoLrnID.Value, hidPtrnID.Value, Convert.ToString(Session["BranchID"]), Convert.ToString(Session["pk_CrPr_Details_ID"]), YCMOU.hidCrPrChIds.Value, null); } } //college login else { DT = clsCollegeAdmissionReports.FillDiscrepancyReport(((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue, hidInstID.Value, hidFacID.Value, hidCrID.Value, hidMoLrnID.Value, hidPtrnID.Value, Convert.ToString(Session["BranchID"]), Convert.ToString(Session["pk_CrPr_Details_ID"]), YCMOU.hidCrPrChIds.Value, null); } Session["DdtData"] = DT; if (DT.Rows.Count > 0) { if (GVReport.Columns[3].HeaderText == "") { string[] terms = YCMOU.hidCrPrChIds.Value.Split(','); if (int.Parse(terms[0]) > int.Parse(terms[1])) { GVReport.Columns[3].HeaderText = "Total Uploaded Data for " + GVReport.Columns[3].HeaderText + " " + YCMOU.hidCrPrChNames.Value.Split(',')[1]; GVReport.Columns[4].HeaderText = "Total Uploaded Data for " + GVReport.Columns[4].HeaderText + " " + YCMOU.hidCrPrChNames.Value.Split(',')[0]; } else if (int.Parse(terms[0]) < int.Parse(terms[1])) { GVReport.Columns[3].HeaderText = "Total Uploaded Data for " + GVReport.Columns[3].HeaderText + " " + YCMOU.hidCrPrChNames.Value.Split(',')[0]; GVReport.Columns[4].HeaderText = "Total Uploaded Data for " + GVReport.Columns[4].HeaderText + " " + YCMOU.hidCrPrChNames.Value.Split(',')[1]; } } hidFacName.Value = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text; hidCrName.Value = ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text; hidBrName.Value = ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text; hidCrPrName.Value = ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text; GVReport.DataSource = DT; GVReport.DataBind(); Button3.Style.Add("display", "block"); btnPDF.Style.Add("display", "block"); string RegCentreName = string.Empty; if (YCMOU.IsCollegeLogin.Equals(false)) { if (YCMOU.IsRegionalCenterVisible.Equals(true)) { if (((RadioButton)YCMOU.FindControl("ChkSelectedRegionalCenter")).Checked) { RegCentreName = ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedItem.Text; courseOrColl = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text + " - for Regional Center " + RegCentreName; } else { courseOrColl = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text + " - for All Regional Centers "; } } else { courseOrColl = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text; } } else { courseOrColl = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text; } HideSearchCriteria(); } lblAcaYear.Text = courseOrColl + " [Academic Year " + ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text + "]"; if (((System.Data.DataTable)Session["Ddtdata"]) == null || ((System.Data.DataTable)Session["Ddtdata"]).Rows.Count == 0) { string RegCentreName = string.Empty; courseOrColl = hidCollName.Value; if (courseOrColl == "") { if (YCMOU.IsCollegeLogin.Equals(false)) { if (YCMOU.IsRegionalCenterVisible.Equals(true)) { if (((RadioButton)YCMOU.FindControl("ChkSelectedRegionalCenter")).Checked) { RegCentreName = ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedItem.Text; courseOrColl = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text + "- for Regional Center " + RegCentreName; } else { courseOrColl = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text + " - for All Regional Centers "; } } else { courseOrColl = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text; } } else { courseOrColl = ((DropDownList)YCMOU.FindControl("ddlFaculty")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlCourse")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlBranch")).SelectedItem.Text + " - " + ((DropDownList)YCMOU.FindControl("ddlPart")).SelectedItem.Text; } } lblAcaYear.Text = courseOrColl + " [Academic Year " + ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text + "]"; lblExportedData.Text = "No records found."; tblExportedDataMsg.Style.Add("display", "block"); Session.Remove("dtdata"); } if (dtCollege != null) { dtCollege = null; } } catch (Exception Ex4) { throw new Exception(Ex4.Message); } }