protected void btnGo_Click(object sender, EventArgs e)
    {
        ddlSchool.Enabled        = false;
        ddlBoard.Enabled         = false;
        ddlMedium.Enabled        = false;
        ddlStandard.Enabled      = false;
        ddlDivision.Enabled      = false;
        grdAtt.Visible           = true;
        btnexporttoexcel.Visible = true;
        DataSet ds = new DataSet();

        this.Obj_Dal_ClassroomWiseAttendance = new ClassroomWiseAttendance();
        ds = this.Obj_Dal_ClassroomWiseAttendance.GetClasswiseMonthlyAttendance(Convert.ToInt32(ddlSchool.SelectedValue), Get_DDMMYYYY(txtDate.Text), Convert.ToInt64(ViewState["BMSID"]), Convert.ToInt32(ddlDivision.SelectedValue));
        ViewState["reportdatatable"] = ds.Tables[0];
        if (ds.Tables[0].Rows.Count > 0)
        {
            grdAtt.DataSource = ds.Tables[0];
            grdAtt.DataBind();
        }
        else
        {
            grdAtt.DataSource = null;
            grdAtt.DataBind();
        }
    }
    protected void btnback_Click(object sender, EventArgs e)
    {
        if (CurrentReport == "SchoolAttendance")
        {
        }
        else if (CurrentReport == "ClassAttendance")
        {
            rptSchoolAttendance.Visible = true;
            rptClassAttendance.Visible  = false;
            //FirstReport.Visible = true;
            Div1.Visible      = true;
            secondRpt.Visible = false;
            btnback.Visible   = false;

            DataSet ds = new DataSet();
            this.Obj_Dal_ClassroomWiseAttendance = new ClassroomWiseAttendance();
            ReportsForResult objRsultReport = new ReportsForResult();
            ds = this.Obj_Dal_ClassroomWiseAttendance.GetClasswiseAttendance(Convert.ToInt32(ddlSchool.SelectedValue), Convert.ToInt32(ddlBoard.SelectedValue), Convert.ToInt32(ddlMedium.SelectedValue), Convert.ToInt32(ddlStandard.SelectedValue), Convert.ToInt32(ddlDivision.SelectedValue), Get_DDMMYYYY(txtDate.Text));
            GetConnectionStringSTRING obj = new GetConnectionStringSTRING();
            connectionstring = obj.BAL_EpathshalaString();

            try
            {
                rptSchoolAttendance.XMLReportFile = Server.MapPath("../ReportXMLFiles/ClassroomWiseAttendanceFirst.xml");
                rptSchoolAttendance.Search(ds.Tables[0]);
                CurrentReport = "SchoolAttendance";
            }
            catch (Exception ex)
            {
                WebMsg.Show("" + ex.Message.ToString());
            }
        }
    }
    private void BindClassWiseAttendanceGrid()
    {
        DataSet dtResult = new DataSet();

        this.Obj_Dal_ClassroomWiseAttendance = new ClassroomWiseAttendance();
        dtResult = this.Obj_Dal_ClassroomWiseAttendance.GetClasswiseAttendance(Convert.ToInt32(ddlSchool.SelectedValue), Convert.ToInt32(ddlBoard.SelectedValue), Convert.ToInt32(ddlMedium.SelectedValue), Convert.ToInt32(ddlStandard.SelectedValue), Convert.ToInt32(ddlDivision.SelectedValue), Get_DDMMYYYY(txtDate.Text, Session["LANG"].ToString()));

        Session["Date"] = txtDate.Text;

        grdClassroomWiseAttendance.DataSource = dtResult;
        grdClassroomWiseAttendance.DataBind();
    }
Beispiel #4
0
 private void BindClassroomattendaceGrid()
 {
     try
     {
         int      SchoolID = Convert.ToInt32(Session["SchoolID"]);
         DateTime Date     = Convert.ToDateTime(Session["Date"]);
         int      BMSID    = Convert.ToInt32(Request.QueryString["BMSID"].ToString());
         DataSet  dtResult = new DataSet();
         this.Obj_Dal_ClassroomWiseAttendance = new ClassroomWiseAttendance();
         dtResult = this.Obj_Dal_ClassroomWiseAttendance.GetAttendance(SchoolID, Date, BMSID);
         grdAttendance.DataSource = dtResult;
         grdAttendance.DataBind();
     }
     catch (Exception ex)
     {
         WebMsg.Show(ex.Message);
     }
 }
Beispiel #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Int32 BMSID = Convert.ToInt32(Request.QueryString["BMSID"]);
            Session["BMSID"] = Convert.ToInt32(Request.QueryString["BMSID"]);

            this.Obj_Dal_ClassroomWiseAttendance = new ClassroomWiseAttendance();
            DataSet dsResult = Obj_Dal_ClassroomWiseAttendance.SelectBMS(BMSID);

            lblSchoolValue.Text     = Session["SchoolName"].ToString();
            lblAttendanceValue.Text = Request.QueryString["Attendance"].ToString();

            lblBMSValue.Text        = dsResult.Tables[0].Rows[0]["BMS"].ToString();
            Session["BMS"]          = dsResult.Tables[0].Rows[0]["BMS"].ToString();
            lblDivValue.Text        = Request.QueryString["Division"];
            Session["DivisionName"] = Request.QueryString["Division"];
            lblDateValue.Text       = Session["Date"].ToString();
            BindClassroomattendaceGrid();
        }
    }
    public void Displayselecteddata(Hashtable hashtable, object objsender)
    {
        ReportControl rpt = (ReportControl)objsender;

        if (rpt.ID == "rptSchoolAttendance")
        {
            rptSchoolAttendance.Visible = false;
            rptClassAttendance.Visible  = true;
            //FirstReport.Visible = false;
            Div1.Visible      = true;
            secondRpt.Visible = true;
            btnback.Visible   = true;

            this.SchoolID      = Convert.ToInt32(ddlSchool.SelectedValue.ToString());
            this.BMSID         = Convert.ToInt32(hashtable["BMSID"].ToString());
            ViewState["BMSID"] = Convert.ToInt32(hashtable["BMSID"].ToString());
            this.BMS           = (hashtable["BMS"].ToString());
            this.Attendance    = (hashtable["Attendance"].ToString());
            this.Division      = (hashtable["Division"].ToString());
            this.Date          = Convert.ToDateTime(txtDate.Text);
            BindValuesToLabels();

            DataSet          ds             = new DataSet();
            ReportsForResult objRsultReport = new ReportsForResult();
            this.Obj_Dal_ClassroomWiseAttendance = new ClassroomWiseAttendance();
            ds = this.Obj_Dal_ClassroomWiseAttendance.GetAttendance(SchoolID, Date, BMSID);

            GetConnectionStringSTRING obj = new GetConnectionStringSTRING();
            connectionstring = obj.BAL_EpathshalaString();

            try
            {
                rptClassAttendance.XMLReportFile = Server.MapPath("../ReportXMLFiles/ClassroomWiseAttendanceSecond.xml");
                rptClassAttendance.Search(ds.Tables[0]);
                CurrentReport = "ClassAttendance";
            }
            catch (Exception ex)
            {
                WebMsg.Show("" + ex.Message.ToString());
            }
        }
        if (rpt.ID == "rptClassAttendance")
        {
            this.SchoolID = Convert.ToInt32(ddlSchool.SelectedValue.ToString());
            this.BMSID    = Convert.ToInt32(ViewState["BMSID"].ToString());
            this.Date     = Convert.ToDateTime(txtDate.Text);
            BindValuesToLabels();

            DataSet          ds             = new DataSet();
            ReportsForResult objRsultReport = new ReportsForResult();
            this.Obj_Dal_ClassroomWiseAttendance = new ClassroomWiseAttendance();

            ds = this.Obj_Dal_ClassroomWiseAttendance.GetAttendance(SchoolID, Date, BMSID);

            GetConnectionStringSTRING obj = new GetConnectionStringSTRING();
            connectionstring = obj.BAL_EpathshalaString();

            try
            {
                rptClassAttendance.XMLReportFile = Server.MapPath("../ReportXMLFiles/ClassroomWiseAttendanceSecond.xml");
                rptClassAttendance.Search(ds.Tables[0]);
                CurrentReport = "ClassAttendance";
            }
            catch (Exception ex)
            {
                WebMsg.Show("" + ex.Message.ToString());
            }
        }
    }