Exemplo n.º 1
0
        private void fillGrid()
        {
            DataTable           dtTmp = new DataTable();
            clsInvoiceGenration obj   = new clsInvoiceGenration();

            dtTmp = obj.REPV2_Invoice_Genration_MonthlyReport(ddlAcademicYear.SelectedValue, ddlAcadYear.SelectedValue, ddlMonth.SelectedValue);
            try
            {
                if (dtTmp != null && dtTmp.Rows.Count > 0)
                {
                    dtTmp.TableName = "Table1";
                    DS1.Tables.Add(dtTmp.Copy());
                    dtTmp = null;
                    lblErrorMsg.Visible = false;

                    GVStat.DataSource = SummaryTables();
                    GVStat.DataBind();
                    Session["dtdata"] = SummaryTables();
                    DTdata            = (DataTable)Session["dtdata"];
                }
                else
                {
                    lblErrorMsg.Visible = true;
                    lblErrorMsg.Text    = "Record not Forund For Selected Criteria.";
                    tblheader.Style.Add("display", "none");
                    divYear.Visible = true;
                }
            }
            catch (Exception) { }
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                hidUniID.Value = Classes.clsGetSettings.UniversityID.ToString();
                DataTable dt = clsCollegeAdmissionReports.GetAcademicYear();
                ViewState["AcademicYear"] = dt;
                //Common.fillDropDown(ddlAcademicYr, dt, "", "Year", "pk_AcademicYear_ID", "--- Select ---");
                //ddlAcademicYr.SelectedIndex = 0;
            }

            //hid_AcademicYear.Value = ddlAcademicYr.SelectedItem.Text;
            //hid_fk_AcademicYr_ID.Value = ddlAcademicYr.SelectedValue.ToString();

            hid_AcademicYear.Value     = ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text;
            hid_fk_AcademicYr_ID.Value = ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue;

            //hiding not required portions of user control
            YCMOU.IsInstituteDisplay         = false;
            YCMOU.IsFacultyDisplay           = false;
            YCMOU.IsCourseDisply             = false;
            YCMOU.IsCoursePartDisply         = false;
            YCMOU.IsCourseTermDisply         = false;
            YCMOU.IsBranchDisply             = false;
            YCMOU.IsReportUserAndDateDisplay = false;
            YCMOU.isMISRpt.Value             = "Yes";
            YCMOU.OnProceedClick            += btnNext_Click;
            //user = (clsUser)Session["User"];

            #region Handling Redirection from Landing page Panels

            if (Request.QueryString["LandingPgStats"] != null && GVStat.Rows.Count == 0)
            {
                string AcYrID   = string.Empty;
                string AcYrText = string.Empty;
                if (Request.QueryString["LandingPgStats"] != null)
                {
                    AcYrID   = Request.QueryString["LandingPgStats"].ToString().Split('|')[0].ToString();
                    AcYrText = Request.QueryString["LandingPgStats"].ToString().Split('|')[1].ToString();
                }

                DT = clsCollegeAdmissionReports.FillMISReportAll(AcYrID, null);
                if (DT.Rows.Count > 0)
                {
                    GVStat.DataSource = DT;
                    GVStat.DataBind();
                    Button3.Style.Add("display", "block");
                    btnPDF.Style.Add("display", "block");
                    divDGStat.Style.Add("display", "block");
                    divYCMOU.Style.Add("display", "none");
                    Session["MISdtData"] = DT;
                    lblAcaYear.Text      = " [Academic Year " + AcYrText + "]";
                }
            }


            #endregion
        }
        private void fillGrid()
        {
            DataTable dtTmp = new DataTable();

            try
            {
                if (YCMOU.IsRegionalCenterVisible.Equals(true))
                {
                    if (((RadioButton)YCMOU.FindControl("ChkSelectedRegionalCenter")).Checked)
                    {
                        dtTmp = clsCollegeAdmissionReports.REPV2_AllInstitutes_uploaded_dataLessThanOneYear(hid_fk_AcademicYr_ID.Value, ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedValue);
                    }
                    else
                    {
                        dtTmp = clsCollegeAdmissionReports.REPV2_AllInstitutes_uploaded_dataLessThanOneYear(hid_fk_AcademicYr_ID.Value, null);
                    }
                }
                else
                {
                    dtTmp = clsCollegeAdmissionReports.REPV2_AllInstitutes_uploaded_dataLessThanOneYear(hid_fk_AcademicYr_ID.Value, null);
                }
                //dtTmp.TableName = "Table1";
                //DS1.Tables.Add(dtTmp.Copy());
                //dtTmp = null;


                //   GVStat.DataSource = SummaryTables();
                GVStat.DataSource = dtTmp;
                GVStat.DataBind();
                // Session["dtdata"] = SummaryTables();
                Session["dtdata"] = dtTmp;
                DTdata            = (DataTable)Session["dtdata"];
            }

            catch (Exception) { }

            GVStat.Visible = true;
            if (GVStat.Rows.Count == 0)
            {
                divDGStat.Style.Add("display", "none");
                //divAcademicYr.Style.Add("display", "block");
                Button3.Style.Add("display", "none");
                //lblAcYrError.Text = "No Record(s) found.";
                // tblNoRecForAcYr.Style.Add("display", "block");
                tblSelect.Style.Add("display", "none");
                tblheader.Style.Add("display", "none");
            }
            if (GVStat.Rows.Count > 0)
            {
                divYCMOU.Style.Add("display", "none");
            }
        }
        private void SortGridView(string sortExpression, string direction)
        {
            grpRow1 = "-";
            index   = 0;
            cntStud = 0;
            grpRow1 = "-";

            index  = 0;
            cntCol = 0;



            DataView dv = new DataView(DT);

            dv.Sort           = sortExpression + direction;
            GVStat.DataSource = dv;
            GVStat.DataBind();
        }
Exemplo n.º 5
0
        protected void btnNext_Click(object sender, EventArgs e)
        {
            string RegCentreName = string.Empty;

            if (YCMOU.IsRegionalCenterVisible.Equals(true))
            {
                if (((RadioButton)YCMOU.FindControl("ChkSelectedRegionalCenter")).Checked)
                {
                    RegCentreName   = ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedItem.Text;
                    lblAcaYear.Text = " Regional Center " + RegCentreName + " [Academic Year " + ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text + "]";
                }
                else
                {
                    lblAcaYear.Text = " All Regional Centers [Academic Year " + ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text + "]";
                }
            }
            else
            {
                lblAcaYear.Text = " [Academic Year " + ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text + "]";
            }


            tblExportedDataMsg.Style.Add("display", "none");
            try
            {
                if (YCMOU.IsRegionalCenterVisible.Equals(true))
                {
                    if (((RadioButton)YCMOU.FindControl("ChkSelectedRegionalCenter")).Checked)
                    {
                        DT = clsCollegeAdmissionReports.FillMISReportAll(((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue, ((DropDownList)YCMOU.FindControl("ddlRegionalCenter")).SelectedValue);
                    }
                    else
                    {
                        DT = clsCollegeAdmissionReports.FillMISReportAll(((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue, null);
                    }
                }
                else
                {
                    DT = clsCollegeAdmissionReports.FillMISReportAll(((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedValue, null);
                }


                Session["MISdtData"] = DT;
                if (DT.Rows.Count > 0)
                {
                    GVStat.DataSource = DT;
                    GVStat.DataBind();
                    Button3.Style.Add("display", "block");
                    btnPDF.Style.Add("display", "block");
                    //divAcademicYr.Style.Add("display", "none");
                    //BtnSubmit.Style.Add("display", "none");
                    divDGStat.Style.Add("display", "block");
                    divYCMOU.Style.Add("display", "none");
                }

                if (((System.Data.DataTable)Session["MISdtData"]) == null || ((System.Data.DataTable)Session["MISdtData"]).Rows.Count == 0)
                {
                    //lblAcaYear.Text = " [Academic Year " + ((DropDownList)YCMOU.FindControl("ddlAcadYear")).SelectedItem.Text + "]";
                    lblExportedData.Text = "No records found.";
                    tblExportedDataMsg.Style.Add("display", "block");
                    Session.Remove("MISdtData");
                    divDGStat.Style.Add("display", "none");
                }

                if (dtCollege != null)
                {
                    dtCollege = null;
                }
            }
            catch (Exception Ex4)
            {
                throw new Exception(Ex4.Message);
            }
        }