Exemplo n.º 1
0
    public void BindDeliveryOrderSummary()
    {
        TechnicalBAL objtechBAL = new TechnicalBAL();
        DataSet      dsReqSumm  = new DataSet();

        dsReqSumm = objtechBAL.GetDeliveryOrderSummary(Request.QueryString["REQUISITION_CODE"].ToString(), Request.QueryString["document_code"].ToString(), Request.QueryString["Vessel_Code"].ToString(), Request.QueryString["DELIVERY_CODE"].ToString());

        lblCatalog.Text   = Convert.ToString(dsReqSumm.Tables[0].Rows[0]["Catalog"]);
        lblReqNo.Text     = Convert.ToString(dsReqSumm.Tables[0].Rows[0]["RequistionCode"]);
        lblTotalItem.Text = Convert.ToString(dsReqSumm.Tables[0].Rows[0]["TotalItems"]);
        lblToDate.Text    = Convert.ToString(dsReqSumm.Tables[0].Rows[0]["ToDate"]);
        lblVessel.Text    = Convert.ToString(dsReqSumm.Tables[0].Rows[0]["VesselName"]);
        txtComments.Text  = Convert.ToString(dsReqSumm.Tables[0].Rows[0]["ReqComents"]);
        lblDelDate.Text   = Convert.ToString(dsReqSumm.Tables[0].Rows[0]["DELIVERY_DATE"]);
        lblDelPort.Text   = Convert.ToString(dsReqSumm.Tables[0].Rows[0]["PORT_NAME"]);

        rgdItems.DataSource = dsReqSumm.Tables[2];
        rgdItems.DataBind();

        rpAttachment.DataSource = dsReqSumm.Tables[1];
        rpAttachment.DataBind();

        gvItemsSupp.DataSource = dsReqSumm.Tables[3];
        gvItemsSupp.DataBind();
    }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string       strRptPath = Server.MapPath(".");
        string       Selection  = Request.QueryString["RptType"].ToString();
        DataSet      dsReqSumm;
        TechnicalBAL objtechBAL;

        ConnectionInfo cInfo     = new ConnectionInfo();
        TableLogOnInfo logOnInfo = new TableLogOnInfo();

        string connstring = System.Configuration.ConfigurationManager.ConnectionStrings["smsconn"].ToString();

        string[] conn         = connstring.ToString().Split(';');
        string[] serverInfo   = conn[0].ToString().Split('=');
        string[] DbInfo       = conn[1].ToString().Split('=');
        string[] userInfo     = conn[2].ToString().Split('=');
        string[] passwordInfo = conn[3].ToString().Split('=');

        cInfo.ServerName   = serverInfo[1].ToString();
        cInfo.DatabaseName = DbInfo[1].ToString();
        cInfo.UserID       = userInfo[1].ToString();
        cInfo.Password     = passwordInfo[1].ToString();

        switch (Selection)
        {
        //For Requistion Summary
        case "ReqSumry":

            objtechBAL = new TechnicalBAL();
            dsReqSumm  = new DataSet();
            dsReqSumm  = objtechBAL.GetRequisitionSummary(Request.QueryString["REQUISITION_CODE"].ToString(), Request.QueryString["document_code"].ToString(), Request.QueryString["Vessel_Code"].ToString());
            ReportDocument rptSumryDoc = new ReportDocument();
            rptSumryDoc.Load(strRptPath + "\\RptRequisitionSummary.rpt");
            rptSumryDoc.OpenSubreport("Items").SetDataSource(dsReqSumm.Tables[1]);
            rptSumryDoc.SetDataSource(dsReqSumm.Tables[0]);
            SummaryReportViewer.ReportSource     = rptSumryDoc;
            SummaryReportViewer.DisplayGroupTree = false;
            SummaryReportViewer.DisplayToolbar   = true;

            break;

        //For Quotation  Summary
        case "QtnSumry":

            objtechBAL = new TechnicalBAL();
            dsReqSumm  = new DataSet();
            dsReqSumm  = objtechBAL.GetRequQuotationSummary(Request.QueryString["REQUISITION_CODE"].ToString(), Request.QueryString["document_code"].ToString(), Request.QueryString["Vessel_Code"].ToString(), Request.QueryString["QUOTATION_CODE"].ToString());

            ReportDocument rptSumryDocQtn = new ReportDocument();
            rptSumryDocQtn.Load(strRptPath + "\\RptQuotationSummary.rpt");
            rptSumryDocQtn.OpenSubreport("RptSubRFQSent").SetDataSource(dsReqSumm.Tables[3]);
            rptSumryDocQtn.OpenSubreport("RptSubQuotationReceived").SetDataSource(dsReqSumm.Tables[2]);
            rptSumryDocQtn.SetDataSource(dsReqSumm.Tables[0]);
            SummaryReportViewer.ReportSource     = rptSumryDocQtn;
            SummaryReportViewer.DisplayGroupTree = false;
            SummaryReportViewer.DisplayToolbar   = true;

            break;

        //For Delivery Order Summary
        case "DelvSumry":
            objtechBAL = new TechnicalBAL();
            dsReqSumm  = new DataSet();
            dsReqSumm  = objtechBAL.GetDeliveryOrderSummary(Request.QueryString["REQUISITION_CODE"].ToString(), Request.QueryString["document_code"].ToString(), Request.QueryString["Vessel_Code"].ToString(), Request.QueryString["DELIVERY_CODE"].ToString());

            ReportDocument rptSumryDelv = new ReportDocument();
            rptSumryDelv.Load(strRptPath + "\\RptDeliverOrderSummary.rpt");
            rptSumryDelv.OpenSubreport("RptSubDeliverOrderSummaryItem").SetDataSource(dsReqSumm.Tables[2]);
            rptSumryDelv.OpenSubreport("RptSubDeliverOrderSummaryAttachment").SetDataSource(dsReqSumm.Tables[1]);
            rptSumryDelv.SetDataSource(dsReqSumm.Tables[0]);
            SummaryReportViewer.ReportSource     = rptSumryDelv;
            SummaryReportViewer.DisplayGroupTree = false;
            SummaryReportViewer.DisplayToolbar   = true;

            break;
        }
    }