public void BindGrid()
    {
        DataTable DTB = P.BookReturnDueDateEntry("SelectAll");

        GrvDetails.DataSource = DTB;
        GrvDetails.DataBind();
    }
Esempio n. 2
0
    public void BindGrid()
    {
        DataTable DTB = P.INSERTBOOKPRICE("SELECT", 0, DateTime.Now, 0, Convert.ToInt32(Session["UserId"]));

        GrvDetails.DataSource = DTB;
        GrvDetails.DataBind();
    }
    public void BindGrid()
    {
        DataTable DTB = P.INSERTCOURSEMAPPING("SELECT", 0, 0, "", "", DateTime.Now, 0);

        GrvDetails.DataSource = DTB;
        GrvDetails.DataBind();
    }
Esempio n. 4
0
    public void LoadEMailData(int Id)
    {
        String  DueDateForMail = Session["Duedateforemail"].ToString();
        DataSet Ds             = P.LoadEMailData("LoadEMailData", DueDateForMail, Id, ddlUserType.SelectedValue.ToString());

        if (Ds != null && Ds.Tables[0].Rows.Count > 0)
        {
            TxtSemester.Text = Convert.ToString(Ds.Tables[0].Rows[0]["Semester"]);
            TxtDueDate.Text  = Convert.ToDateTime(Ds.Tables[0].Rows[0]["DueDate"]).ToString("dd/MM/yyyy");
        }

        if (Ds != null && Ds.Tables[1].Rows.Count > 0)
        {
            GrvDetails.DataSource = Ds.Tables[1];
            GrvDetails.DataBind();
        }
    }
    //public void LoadBookValidityReport()
    //{
    //    System.IO.MemoryStream stream1 = new System.IO.MemoryStream();

    //    try
    //    {
    //        string Path = Server.MapPath("BooksValidity.rpt");
    //        Path = Path.Substring(0, Path.LastIndexOf('\\'));
    //        Path = Path.Substring(0, Path.LastIndexOf('\\'));
    //        Path = Path + "\\Reports\\BooksValidity.rpt";
    //        myReportDocument.Load(Path);

    //        myReportDocument.SetParameterValue("@copyrightdate", 0);

    //        myReportDocument.SetDatabaseLogon("software", "DelFirMENA$idea");
    //        System.IO.Stream oStream = null;
    //        byte[] byteArray = null;
    //        oStream = myReportDocument.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
    //        byteArray = new byte[oStream.Length];
    //        oStream.Read(byteArray, 0, Convert.ToInt32(oStream.Length - 1));
    //        Response.ClearContent();
    //        Response.ClearHeaders();
    //        Response.ContentType = "application/pdf";
    //        Response.BinaryWrite(byteArray);
    //        Response.Flush();
    //        Response.Close();
    //        myReportDocument.Close();
    //        myReportDocument.Dispose();
    //        GC.Collect();
    //    }
    //    catch (Exception Ex)
    //    {

    //    }

    //    finally
    //    {
    //    }
    //}

    //public void LoadBookBookIssueSummary()
    //{
    //    System.IO.MemoryStream stream1 = new System.IO.MemoryStream();

    //    try
    //    {
    //        DateTime DtFromDate = new DateTime();
    //        DateTime DtToDate = new DateTime();

    //        DtFromDate = FromDate(TxtFromDate);
    //        DtToDate = FromDate(txtTodate);

    //        string Path = Server.MapPath("BOOKISSUESUMMARY.rpt");
    //        Path = Path.Substring(0, Path.LastIndexOf('\\'));
    //        Path = Path.Substring(0, Path.LastIndexOf('\\'));
    //        Path = Path + "\\Reports\\BOOKISSUESUMMARY.rpt";
    //        myReportDocument.Load(Path);

    //        myReportDocument.SetParameterValue("@FromDate", DtFromDate);
    //        myReportDocument.SetParameterValue("@ToDate", DtToDate);
    //        myReportDocument.SetParameterValue("@DegreeTypeID", ddlDegreeType.SelectedValue);
    //        myReportDocument.SetParameterValue("@CurriculumID", ddlCurriculum.SelectedValue);
    //        myReportDocument.SetParameterValue("@School", ddlSchools.SelectedValue);

    //        myReportDocument.SetDatabaseLogon("software", "DelFirMENA$idea");
    //        System.IO.Stream oStream = null;
    //        byte[] byteArray = null;
    //        oStream = myReportDocument.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
    //        byteArray = new byte[oStream.Length];
    //        oStream.Read(byteArray, 0, Convert.ToInt32(oStream.Length - 1));
    //        Response.ClearContent();
    //        Response.ClearHeaders();
    //        Response.ContentType = "application/pdf";
    //        Response.BinaryWrite(byteArray);
    //        Response.Flush();
    //        Response.Close();
    //        myReportDocument.Close();
    //        myReportDocument.Dispose();
    //        GC.Collect();
    //    }
    //    catch (Exception Ex)
    //    {

    //    }

    //    finally
    //    {
    //    }
    //}

    public void BindGrid()
    {
        DateTime DtFromDate = new DateTime();
        DateTime DtToDate   = new DateTime();

        DtFromDate = FromDate(TxtFromDate);
        DtToDate   = FromDate(txtTodate);

        //if (RbtCancelledStudent.Checked)
        if (DrpReportOption.SelectedValue == "CANCELLED STUDENTS")
        {
            Dtb = S.BindCancelledStudentsReport(DtFromDate, DtToDate, ddlSchools.SelectedValue, Convert.ToInt32(ddlDegreeType.SelectedValue), Convert.ToInt32(ddlDegreeCode.SelectedValue));
            GrvDetails.DataSource = Dtb;
            GrvDetails.DataBind();

            LoadExcel();
        }
        //else if (RbtBookValidity.Checked)
        else if (DrpReportOption.SelectedValue == "BOOK VALIDITY")
        {
            Dtb = S.BindBooksValidityReport(Convert.ToInt32(ddlCopyrightFromDate.SelectedValue));
            GrvDetails.DataSource = Dtb;
            GrvDetails.DataBind();
            LoadExcel();
        }
        else if (DrpReportOption.SelectedValue == "BOOK ISSUE SUMMARY")
        {
            Dtb = S.BindBookIssueSummaryReport(DtFromDate, DtToDate, ddlSchools.SelectedValue, Convert.ToInt32(ddlDegreeType.SelectedValue), Convert.ToInt32(ddlCurriculum.SelectedValue));
            GrvDetails.DataSource = Dtb;
            GrvDetails.DataBind();
            LoadExcel();
        }

        else if (DrpReportOption.SelectedValue == "BOOKS NOT COLLECTED STATISTICS")
        {
            Dtb = S.BindBookNotCollectStatsticsReport(DtFromDate, DtToDate, ddlSchools.SelectedValue, Convert.ToInt32(ddlDegreeType.SelectedValue), Convert.ToInt32(ddlCurriculum.SelectedValue));
            GrvDetails.DataSource = Dtb;
            GrvDetails.DataBind();
            LoadExcel();
        }
    }
Esempio n. 6
0
    public void BindGrid()
    {
        string[] stringdate1 = new string[3];
        if (TxtFromDate.Text != "")
        {
            stringdate1 = TxtFromDate.Text.Split('/');
        }
        else
        {
            stringdate1 = "01/01/1990".Split('/');
        }
        DateTime FromDate = new DateTime(Convert.ToInt32(stringdate1[2]), Convert.ToInt32(stringdate1[1]), Convert.ToInt32(stringdate1[0]));


        string[] stringdate2 = new string[3];
        if (txtTodate.Text != "")
        {
            stringdate2 = txtTodate.Text.Split('/');
        }
        else
        {
            stringdate2 = "01/01/1990".Split('/');
        }
        stringdate2 = txtTodate.Text.Split('/');

        String Operation = "";

        if (DrpReportOption.SelectedValue == "BOOK ISSUANCE")
        {
            Operation = "BOOK ISSUANCE";
        }
        else if (DrpReportOption.SelectedValue == "BOOKS NOTCOLLECTED")
        {
            Operation = "BOOKS NOTCOLLECTED";
        }
        else if (DrpReportOption.SelectedValue == "BOOKS RETURN STATUS")
        {
            Operation = "BOOKS RETURN STATUS";
        }
        else if (DrpReportOption.SelectedValue == "REFERENCE BOOKS UTILIZATION")
        {
            Operation = "REFERENCE BOOKS UTILIZATION";
        }
        else if (DrpReportOption.SelectedValue == "ALL BOOKS RETURN STATUS")
        {
            Operation = "BOOK ISSUANCE";
        }
        else if (DrpReportOption.SelectedValue == "TRANSACTION DETAILS")
        {
            Operation = "TRANSACTION DETAILS";
        }
        else if (DrpReportOption.SelectedValue == "BOOKS NOT RETURNED")
        {
            Operation = "BOOKS NOT RETURNED";
        }

        DateTime EndDate = new DateTime(Convert.ToInt32(stringdate2[2]), Convert.ToInt32(stringdate2[1]), Convert.ToInt32(stringdate2[0]));

        DataTable Dtb = P.BindFortNightlyReport(FromDate, EndDate, Operation, Convert.ToInt32(DrpProgram.SelectedValue),
                                                Convert.ToInt32(DrpCurriculum.SelectedValue), Convert.ToInt32(DrpSemester.SelectedValue),
                                                DDLBookType.SelectedValue, DrpUserType.SelectedValue, RdbReportOption.SelectedValue);

        GrvDetails.DataSource = Dtb;
        GrvDetails.DataBind();
    }