Ejemplo n.º 1
0
        protected void BindFeesGrid()
        {
            try
            {
                FeesCollectionBL  objFeeCollectionBL = new FeesCollectionBL();
                ApplicationResult objResults         = new ApplicationResult();

                objResults = objFeeCollectionBL.Fee_Collection_PastDetail(Convert.ToInt32(Session[ApplicationSession.SCHOOLID]), Convert.ToInt32(ViewState["ClassMID"].ToString()), Convert.ToInt32(ViewState["DivisionName"].ToString()), ddlYear.SelectedItem.ToString(), Convert.ToInt32(ViewState["StudentMID"].ToString()));
                if (objResults != null)
                {
                    gvPastFees.Visible    = true;
                    gvPastFees.DataSource = objResults.resultDT;
                    gvPastFees.DataBind();
                    if (objResults.resultDT.Rows.Count > 0)
                    {
                        aa.Visible          = true;
                        divPastFees.Visible = true;
                    }
                    else
                    {
                        aa.Visible          = false;
                        divPastFees.Visible = false;
                        ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp", "<script>alert('No Record Found.');</script>");
                    }
                }
            }
            catch (Exception ex)
            {
                logger.Error("Error", ex);
                ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp", "<script>alert('Oops! There is some technical issue. Please Contact to your administrator.');</script>");
            }
        }
Ejemplo n.º 2
0
        protected void BindFeesGrid()
        {
            try
            {
                FeesCollectionBL  objFeeCollectionBL = new FeesCollectionBL();
                ApplicationResult objResults         = new ApplicationResult();
                objResults = objFeeCollectionBL.Fee_Collection_WithOptionalAndCompulsoryFees(Convert.ToInt32(ViewState["StudentMID"].ToString()));
                if (objResults != null)
                {
                    gvFees.Visible    = true;
                    gvFees.DataSource = objResults.resultDT;
                    gvFees.DataBind();
                    if (objResults.resultDT.Rows.Count > 0)
                    {
                        divFeeVisibility.Visible = true;
                        lblFee.Visible           = false;
                        pnlFees.Visible          = true;
                    }
                    else
                    {
                        // ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp", "<script language='javascript'>alert('Class Fee Template is not defined for " + Convert.ToInt32(ViewState["ClassName"].ToString()) + "-" + ViewState["Division"].ToString() + "( " + ViewState["AcademicYear"].ToString() + " ).');</script>");
                        divFeePanel.Visible      = true;
                        divFeeVisibility.Visible = false;
                        pnlFees.Visible          = false;
                        lblFee.Visible           = true;
                        lblFee.Text = "No fee Details";
                    }
                }

                objResults = objFeeCollectionBL.Fee_Collection_PastDetail(Convert.ToInt32(Session[ApplicationSession.SCHOOLID]), Convert.ToInt32(ViewState["ClassMID"].ToString()), Convert.ToInt32(ViewState["DivisionName"].ToString()), ViewState["AcademicYear"].ToString(), Convert.ToInt32(ViewState["StudentMID"].ToString()));
                if (objResults != null)
                {
                    if (objResults.resultDT.Rows.Count > 0)
                    {
                        lblmsg.Visible        = false;
                        gvPastFees.Visible    = true;
                        gvPastFees.DataSource = objResults.resultDT;
                        gvPastFees.DataBind();
                        divFeeVisibility.Visible = true;
                    }
                    else
                    {
                        //divPastFees.Visible = false;
                        lblmsg.Visible = true;
                        lblmsg.Text    = "No Past Record.";
                    }
                }
            }
            catch (Exception ex)
            {
                logger.Error("Error", ex);
                ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp", "<script>alert('Oops! There is some technical issue. Please Contact to your administrator.');</script>");
            }
        }