Ejemplo n.º 1
0
        public bool Delete(EngineeringRequisitionProvider provider)
        {
            bool IsDelete = false;

            try
            {
                SqlCommand command = new SqlCommand();
                this.ConnectionOpen();
                command.Connection = Connection;
                this.BeginTransaction(true);
                command.Transaction = this.Transaction;
                command.CommandType = CommandType.StoredProcedure;
                command.CommandText = StoredProcedureNames.RequisitionSet;
                command.Parameters.Add("@ID", SqlDbType.Int).Value     = provider.ID;
                command.Parameters.Add("@Option", SqlDbType.Int).Value = DBConstants.DataModificationOption.Delete;
                command.ExecuteNonQuery();
                this.CommitTransaction();
                this.ConnectionClosed();
                IsDelete = true;
            }
            catch (Exception exp)
            {
                this.RollbackTransaction();
                throw new Exception(exp.Message);
            }
            finally
            {
                this.ConnectionClosed();
            }
            return(IsDelete);
        }
Ejemplo n.º 2
0
        public bool Save(EngineeringRequisitionProvider ProductionRequisitionProvider, List <EngineeringRequisitionDetailProvider> ProductionRequisitionDetailProviderList, out string transactionNo)
        {
            bool IsSave = false;

            try
            {
                SqlCommand command = new SqlCommand();
                this.ConnectionOpen();
                command.Connection = Connection;
                this.BeginTransaction(true);
                command.Transaction = this.Transaction;
                command.CommandType = CommandType.StoredProcedure;
                command.CommandText = StoredProcedureNames.EngineeringRequisitionSet;
                SqlParameter t = new SqlParameter("@TransactionNo", SqlDbType.VarChar);
                t.Direction = ParameterDirection.Output;
                t.Size      = 16;
                command.Parameters.Add(t);
                SqlParameter id = new SqlParameter("@ID", SqlDbType.Int);
                id.Direction = ParameterDirection.Output;
                command.Parameters.Add(id);
                command.Parameters.Add("@RequisitionDate", SqlDbType.DateTime).Value = ProductionRequisitionProvider.RequisitionDate;
                command.Parameters.Add("@EntryUserID", SqlDbType.Int).Value          = ProductionRequisitionProvider.EntryUserID;
                command.Parameters.Add("@StatusID", SqlDbType.Int).Value             = ProductionRequisitionProvider.StatusID;
                command.Parameters.Add("@Option", SqlDbType.Int).Value = DBConstants.DataModificationOption.Insert;
                command.ExecuteNonQuery();

                transactionNo = (string)command.Parameters["@TransactionNo"].Value;
                int RequisitionID = (int)command.Parameters["@ID"].Value;

                foreach (EngineeringRequisitionDetailProvider RequisitionDetailsProvider in ProductionRequisitionDetailProviderList)
                {
                    command             = new SqlCommand();
                    command.Connection  = Connection;
                    command.Transaction = this.Transaction;
                    command.CommandType = CommandType.StoredProcedure;
                    command.CommandText = StoredProcedureNames.EngineeringRequisitionDetailSet;
                    command.Parameters.Add("@RequisitionID", SqlDbType.Int).Value        = RequisitionID;
                    command.Parameters.Add("@ProductID", SqlDbType.Int).Value            = RequisitionDetailsProvider.ProductID;
                    command.Parameters.Add("@RequiredQuantity", SqlDbType.Decimal).Value = RequisitionDetailsProvider.RequiredQuantity;
                    command.Parameters.Add("@SentQuantity", SqlDbType.Decimal).Value     = RequisitionDetailsProvider.SentQuantity;
                    command.Parameters.Add("@Remarks", SqlDbType.VarChar).Value          = RequisitionDetailsProvider.Remarks;
                    command.Parameters.Add("@Option", SqlDbType.Int).Value = DBConstants.DataModificationOption.Insert;
                    command.ExecuteNonQuery();
                }

                this.CommitTransaction();
                this.ConnectionClosed();
                IsSave = true;
            }
            catch (Exception exp)
            {
                this.RollbackTransaction();
                throw new Exception(exp.Message);
            }
            finally
            {
                this.ConnectionClosed();
            }
            return(IsSave);
        }
Ejemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         AddBlankRowTogvPurchaseProduct();
         btnSave.Enabled         = true;
         txtRequisitionDate.Text = string.Format("{0:dd/MM/yyyy}", DateTime.Now);
     }
     else
     {
         Page.ClientScript.GetPostBackEventReference(this, String.Empty);
         String eventTarget = Request["__EVENTTARGET"].IsNullOrEmpty() ? String.Empty : Request["__EVENTTARGET"];
         if (Request["__EVENTTARGET"] == "SearchPriceSetup")
         {
             var       requisitionProvider = new EngineeringRequisitionProvider();
             string    code = Request["__EVENTARGUMENT"];
             DataTable dt   = requisitionProvider.GetByID(code);
             if (dt.IsNotNull())
             {
                 PopulateControls(dt);
                 gvPurchaseForLSE.DataSource = dt;
                 gvPurchaseForLSE.DataBind();
             }
             btnSave.Visible   = false;
             btnUpdate.Visible = true;
         }
     }
     Session["Value"] = ddlRequisitionDivision.SelectedValue;
 }
Ejemplo n.º 4
0
        private EngineeringRequisitionProvider RequisitionInfoEntity()
        {
            EngineeringRequisitionProvider entity = null;

            entity = new EngineeringRequisitionProvider
            {
                TransactionNo = txtRefNo.Text,

                TransactionDate = DateTime.ParseExact(txtRequisitionDate.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture),
                RequisitionDate = DateTime.ParseExact(txtRequisitionDate.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture),
                DivisionID      = int.Parse(ddlRequisitionDivision.SelectedValue),
                StatusID        = ckbOption.SelectedValue.Toint(),
                EntryUserID     = Convert.ToInt16(Session["ID"])
            };
            return(entity);
        }
Ejemplo n.º 5
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            mode = "Save";

            string permisionMessage = CheckUserAuthentication(mode);

            if (ckbOption.SelectedValue != "")
            {
                statusMessage = CheckUserAuthentication(ckbOption.SelectedItem.ToString());
            }
            if (String.IsNullOrEmpty(permisionMessage) && string.IsNullOrEmpty(statusMessage))
            {
                bool   msg           = false;
                string message       = string.Empty;
                string transactionNo = string.Empty;
                try
                {
                    EngineeringRequisitionProvider requisitionProvider = RequisitionInfoEntity();
                    List <EngineeringRequisitionDetailProvider> requisitionDetailList = requisitionDetailEntityList();
                    if ((requisitionDetailList == null) || (requisitionDetailList.Count == 0))
                    {
                        MessageHelper.ShowAlertMessage("Please select at least one product for purchase");
                        return;
                    }
                    msg = requisitionProvider.Save(requisitionDetailList, out transactionNo);
                }
                catch (Exception ex)
                {
                    message = ex.Message;
                }
                if (msg)
                {
                    Clear();
                    txtRefNo.Text = transactionNo;
                    this.AlertSuccess(lblMsg, MessageConstants.Saved);
                }
                else
                {
                    MessageHelper.ShowAlertMessage(message);
                }
            }
            else
            {
                MessageHelper.ShowAlertMessage(permisionMessage + statusMessage);
            }
        }
Ejemplo n.º 6
0
        public bool Update(EngineeringRequisitionProvider ProductionRequisitionProvider, List <EngineeringRequisitionDetailProvider> RequisitionDetailProviderList)
        {
            bool IsUpdate = false;

            try
            {
                SqlCommand command = new SqlCommand();
                this.ConnectionOpen();
                command.Connection = Connection;
                this.BeginTransaction(true);
                command.Transaction = this.Transaction;
                command.CommandType = CommandType.StoredProcedure;
                command.CommandText = StoredProcedureNames.EngineeringRequisitionSet;
                SqlParameter id = new SqlParameter("@ID", SqlDbType.Int);
                id.Direction = ParameterDirection.Output;
                command.Parameters.Add(id);
                command.Parameters.Add("@ReferenceNo", SqlDbType.VarChar).Value      = ProductionRequisitionProvider.TransactionNo;
                command.Parameters.Add("@RequisitionDate", SqlDbType.DateTime).Value = ProductionRequisitionProvider.RequisitionDate;
                command.Parameters.Add("@UpdateUserID", SqlDbType.Int).Value         = ProductionRequisitionProvider.UpdateUserID;
                command.Parameters.Add("@StatusID", SqlDbType.Int).Value             = ProductionRequisitionProvider.StatusID;

                command.Parameters.Add("@Option", SqlDbType.Int).Value = DBConstants.DataModificationOption.Update;
                command.ExecuteNonQuery();

                int RequisitionID = (int)command.Parameters["@ID"].Value;
                command             = new SqlCommand();
                command.Connection  = Connection;
                command.Transaction = this.Transaction;
                command.CommandText = "DELETE FROM dbo.EngineeringRequisitionDetail WHERE RequisitionID =" + RequisitionID + " ";
                command.ExecuteNonQuery();

                foreach (EngineeringRequisitionDetailProvider RequisitionDetailsProvider in RequisitionDetailProviderList)
                {
                    command             = new SqlCommand();
                    command.Connection  = Connection;
                    command.Transaction = this.Transaction;
                    command.CommandType = CommandType.StoredProcedure;
                    command.CommandText = StoredProcedureNames.EngineeringRequisitionDetailSet;
                    command.Parameters.Add("@RequisitionID", SqlDbType.Int).Value        = RequisitionID;
                    command.Parameters.Add("@ProductID", SqlDbType.Int).Value            = RequisitionDetailsProvider.ProductID;
                    command.Parameters.Add("@RequiredQuantity", SqlDbType.Decimal).Value = RequisitionDetailsProvider.RequiredQuantity;
                    command.Parameters.Add("@SentQuantity", SqlDbType.Decimal).Value     = RequisitionDetailsProvider.SentQuantity;
                    command.Parameters.Add("@Remarks", SqlDbType.VarChar).Value          = RequisitionDetailsProvider.Remarks;
                    command.Parameters.Add("@Option", SqlDbType.Int).Value = DBConstants.DataModificationOption.Update;
                    command.ExecuteNonQuery();
                }
                ////////////////////////////////////////////////////////////////////////////// For stock out /////////////////////

                if (ProductionRequisitionProvider.StatusID == 2)
                {
                    command             = new SqlCommand();
                    command.Connection  = Connection;
                    command.Transaction = this.Transaction;
                    command.CommandType = CommandType.StoredProcedure;
                    command.CommandText = StoredProcedureNames.ProductStockSet;
                    SqlParameter id1 = new SqlParameter("@ID", SqlDbType.Int);
                    id1.Direction = ParameterDirection.Output;
                    command.Parameters.Add(id1);
                    command.Parameters.Add("@TransactionNo", SqlDbType.VarChar, 16).Value = ProductionRequisitionProvider.TransactionNo;
                    command.Parameters.Add("@TransactionTypeID", SqlDbType.Int).Value     = 5;
                    command.Parameters.Add("@EntryUserID", SqlDbType.Int).Value           = ProductionRequisitionProvider.EntryUserID;
                    command.Parameters.Add("@Option", SqlDbType.Int).Value = DBConstants.DataModificationOption.Insert;
                    command.ExecuteNonQuery();

                    int ProStockID = (int)command.Parameters["@ID"].Value;

                    command             = new SqlCommand();
                    command.Connection  = Connection;
                    command.Transaction = this.Transaction;
                    command.CommandText = "DELETE FROM Inventory.ProductCurrentStockDetail WHERE ProdStockID = " + ProStockID + " ";
                    command.ExecuteNonQuery();

                    foreach (EngineeringRequisitionDetailProvider productionRequisitionDetailProvider in RequisitionDetailProviderList)
                    {
                        command             = new SqlCommand();
                        command.Connection  = Connection;
                        command.Transaction = this.Transaction;
                        command.CommandType = CommandType.StoredProcedure;
                        command.CommandText = StoredProcedureNames.ProductStockDetailSet;
                        command.Parameters.Add("@ProStockID", SqlDbType.Int).Value           = ProStockID;
                        command.Parameters.Add("@ProductID", SqlDbType.Int).Value            = productionRequisitionDetailProvider.ProductID;
                        command.Parameters.Add("@ReceivedQuantity", SqlDbType.Decimal).Value = 0;
                        command.Parameters.Add("@SentQuantity", SqlDbType.Decimal).Value     = productionRequisitionDetailProvider.SentQuantity;
                        command.Parameters.Add("@Option", SqlDbType.Int).Value = DBConstants.DataModificationOption.Insert;
                        command.ExecuteNonQuery();
                    }
                }
                this.CommitTransaction();
                this.ConnectionClosed();
                IsUpdate = true;
            }
            catch (Exception exp)
            {
                this.RollbackTransaction();
                throw new Exception(exp.Message);
            }
            finally
            {
                this.ConnectionClosed();
            }
            return(IsUpdate);
        }
Ejemplo n.º 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DataTable dt;
            var       reportPath      = new ReportPath();
            var       reportParameter = new ReportParameter();
            var       reportDocument  = new ReportDocument();
            int       reportType      = Request.QueryString["ReportType"].Toint();
            DateTime  fromDate        = Request.QueryString["fromDate"].ToDate();
            DateTime  toDate          = Request.QueryString["toDate"].ToDate();
            DateTime  aDate           = Request.QueryString["aDate"].ToDate();
            int       reportOption    = Request.QueryString["reportOption"].Toint();
            int       reportCategory  = Request.QueryString["reportCategory"].Toint();
            int       productID       = Request.QueryString["productID"].Toint();
            var       transactionID   = Request.QueryString["transactionNo"];
            string    printOption     = Request.QueryString["printOption"];

            //******** Updated Datetime ********//
            DateTime?fDate;
            DateTime?tDate;
            DateTime?Date;

            switch (reportType)
            {
                #region  Supplier Report
            case ReportType.SupplierReport:          //////////// For Supplier Info report
                var supplierProvider = new SupplierProvider();
                int supplierTypeID   = Request.QueryString["SupplierTypeID"].ToInt();
                dt = supplierProvider.GetSupplierByTypeID(supplierTypeID);
                if (dt != null && dt.Rows.Count > 0)
                {
                    reportDocument.Load(reportPath.SupplierReportPath);
                    GetValue(dt, reportParameter, reportDocument);
                }
                else
                {
                    GetMsg(reportParameter, reportDocument, reportPath);
                }
                break;

            case ReportType.SupplierProductReport:          //////////// For Supplier Product report
                supplierProvider = new SupplierProvider();
                int supplierID = Request.QueryString["SupplierID"].ToInt();
                dt = supplierProvider.GetByID(supplierID);
                if (dt != null && dt.Rows.Count > 0)
                {
                    reportDocument.Load(reportPath.SupplierProductReportPath);
                    GetValue(dt, reportParameter, reportDocument);
                }
                else
                {
                    GetMsg(reportParameter, reportDocument, reportPath);
                }
                break;
                #endregion

                #region  Requisition Report
            case ReportType.RequisitionReport:       //////////// For Requisition report
                var requisitionProvider = new RequisitionProvider();
                fDate = GetNullfDatetime();
                tDate = GetNulltDatetime();
                Date  = GetNullaDatetime();
                if (reportOption == 3)
                {
                    var requisitionNo = Request.QueryString["transactionNo"].Trim();
                    dt = requisitionProvider.GetByID(requisitionNo);
                    if (dt != null && dt.Rows.Count > 0)
                    {
                        reportDocument.Load(reportPath.RequisitionReportPath);
                        GetValueWithDate(dt, reportParameter, reportDocument);
                    }
                    else
                    {
                        GetMsg(reportParameter, reportDocument, reportPath);
                    }
                }
                else
                {
                    dt = requisitionProvider.GetAllByDateWise(productID, transactionID, fDate, tDate, Date, reportOption);
                    if (dt != null && dt.Rows.Count > 0)
                    {
                        if (reportOption == 2)
                        {
                            reportDocument.Load(reportPath.RequisitionReportPath);
                            GetValueWithFromToDate(reportParameter, reportDocument, dt, fDate, tDate);
                        }
                        else if (reportOption == 1)
                        {
                            reportDocument.Load(reportPath.RequisitionReportPath);
                            GetValueAGetDate(dt, reportParameter, reportDocument, Date);
                        }
                    }
                    else
                    {
                        GetMsg(reportParameter, reportDocument, reportPath);
                    }
                }
                break;
                #endregion

                #region Purchase Order Report
            case ReportType.PurchaseOrderReport:       //////////// For Purchase Order report
                var purchaseOrderProvider = new PurchaseOrderProvider();
                fDate = GetNullfDatetime();
                tDate = GetNulltDatetime();
                if (reportCategory == 1)
                {
                    var purchaseOrderNo = Request.QueryString["transactionNo"].Trim();
                    dt = purchaseOrderProvider.GetByID(purchaseOrderNo);
                    if (dt != null && dt.Rows.Count > 0)
                    {
                        decimal value      = 0.00M;
                        decimal totalValue = 0.00M;
                        foreach (DataRow dr in dt.Rows)
                        {
                            value      = Convert.ToDecimal(dr["Value"]);
                            totalValue = totalValue + value;
                        }
                        string textValue = NumberToText(Convert.ToInt32(totalValue), true);

                        System.Data.DataColumn newColumn = new System.Data.DataColumn("TotalAmountInText", typeof(System.String));
                        newColumn.DefaultValue = textValue;
                        dt.Columns.Add(newColumn);


                        reportDocument.Load(reportPath.PurchaseOrderReportPath);
                        GetValueWithDate(dt, reportParameter, reportDocument);
                    }
                    else
                    {
                        GetMsg(reportParameter, reportDocument, reportPath);
                    }
                }
                else if (reportCategory == 2)      //// Purchase Order Detail Report - Single Product/////////////////////
                {
                    dt = purchaseOrderProvider.GetAllData(productID);
                    if (dt != null && dt.Rows.Count > 0)
                    {
                        reportDocument.Load(reportPath.PurchaseOrderDetailReportPath);
                        GetValueWithFromToDate(reportParameter, reportDocument, dt, fDate, tDate);
                    }
                    else
                    {
                        GetMsg(reportParameter, reportDocument, reportPath);
                    }
                }
                break;
                #endregion

                #region Delivery Challan Report
            case ReportType.DeliveryChallanReport:       //////////// For Delivery Challan Report
                var deliveryChallanProvider = new DeliveryChallanProvider();
                fDate = GetNullfDatetime();
                tDate = GetNulltDatetime();
                if (reportOption == 2)
                {
                    var deliveryChallanNo = Request.QueryString["transactionNo"].Trim();
                    dt = deliveryChallanProvider.GetByID(deliveryChallanNo);
                    if (dt != null && dt.Rows.Count > 0)
                    {
                        reportDocument.Load(reportPath.DeliveryChallanReportPath);
                        GetValueWithDate(dt, reportParameter, reportDocument);
                    }
                    else
                    {
                        GetMsg(reportParameter, reportDocument, reportPath);
                    }
                }
                else
                {
                    //dt = purchaseOrderProvider.GetAllByDateWise(productID, transactionID, fDate, tDate, adate, reportOption);
                    //if (dt != null && dt.Rows.Count > 0)
                    //{
                    //    if (reportOption == 2)
                    //    {
                    //        reportDocument.Load(reportPath.RequisitionReportPath);
                    //        GetValueWithFromToDate(reportParameter, reportDocument, dt, fDate, tDate);
                    //    }
                    //    else if (reportOption == 1)
                    //    {
                    //        reportDocument.Load(reportPath.RequisitionReportPath);
                    //        GetValueAGetDate(dt, reportParameter, reportDocument, adate);
                    //    }
                    //}
                    //else
                    //{
                    //    GetMsg(reportParameter, reportDocument, reportPath);
                    //}
                }
                break;
                #endregion

                #region Production Requisition Report
            case ReportType.ProductionRequisitionReport:
                var productionRequisitionProvider = new ProductionRequisitionProvider();
                fDate = GetNullfDatetime();
                tDate = GetNulltDatetime();
                if (reportOption == 2)
                {
                    //var prodReqNo = Request.QueryString["transactionNo"].Trim();
                    //dt = productionRequisitionProvider.GetByID(prodReqNo);
                    //if (dt != null && dt.Rows.Count > 0)
                    //{
                    //    reportDocument.Load(reportPath.ProductionRequisitionReportPath);
                    //    GetValueWithDate(dt, reportParameter, reportDocument);
                    //}
                    //else
                    //{
                    //    GetMsg(reportParameter, reportDocument, reportPath);
                    //}
                }
                else
                {
                }
                break;
                #endregion

                #region Prodct Stock Report
            case ReportType.ProductCurrentStockReport:
                var productCurrentStockProvider = new ProductCurrentStockProvider
                {
                    ProductID   = Request.QueryString["ProductID"].ToInt(),
                    DivisionID  = Request.QueryString["DivisionID"].ToInt(),
                    ProductType = Request.QueryString["ProductType"].ToInt(),
                    FromDate    = Request.QueryString["fromDate"].ToString(),
                    Todate      = Request.QueryString["todate"].ToString()
                };
                if (productCurrentStockProvider.ProductID == 0)
                {
                    dt = productCurrentStockProvider.GetDivisionAndItemwise();
                    if (dt != null && dt.Rows.Count > 0)
                    {
                        reportDocument.Load(reportPath.AllProductStockReportPath);
                        GetValueWithDate(dt, reportParameter, reportDocument);
                    }
                    else
                    {
                        GetMsg(reportParameter, reportDocument, reportPath);
                    }
                }
                else
                {
                    var mushak16ProviderList = productCurrentStockProvider.GetAll();
                    if (mushak16ProviderList != null)
                    {
                        reportDocument.Load(reportPath.ProductIndividualStockReportPath);
                        reportDocument.SetDataSource(mushak16ProviderList);
                        GetAddressValue(reportParameter, reportDocument);
                        technoCrystalReport.ReportSource = reportDocument;
                        technoCrystalReport.DataBind();
                    }
                    else
                    {
                        GetMsg(reportParameter, reportDocument, reportPath);
                    }
                }
                break;
                #endregion

                #region LC Report
            case ReportType.LCReport:       //////////// For LC report
                var lCProvider = new LCProvider();
                fDate = GetNullfDatetime();
                tDate = GetNulltDatetime();
                if (reportCategory == 2)       /////////////// LC Detail Report ///////////////
                {
                    dt = lCProvider.GetByDateRangeWise(fromDate, toDate, reportCategory);
                    if (dt != null && dt.Rows.Count > 0)
                    {
                        reportDocument.Load(reportPath.LCDetailReportPath);
                        GetValueWithDate(dt, reportParameter, reportDocument);
                    }
                    else
                    {
                        GetMsg(reportParameter, reportDocument, reportPath);
                    }
                }
                else if (reportCategory == 1)      //// LC Summary Report /////////////////////
                {
                    dt = lCProvider.GetByDateRangeWise(fromDate, toDate, reportCategory);
                    if (dt != null && dt.Rows.Count > 0)
                    {
                        reportDocument.Load(reportPath.LCSummaryReportPath);
                        GetValueWithFromToDate(reportParameter, reportDocument, dt, fDate, tDate);
                    }
                    else
                    {
                        GetMsg(reportParameter, reportDocument, reportPath);
                    }
                }
                break;
                #endregion

                #region BOE Report
            case ReportType.BOEReport:       //////////// For BOE report
                var bOEProvider = new BOEProvider();
                fDate = GetNullfDatetime();
                tDate = GetNulltDatetime();
                if (reportCategory == 2)
                {
                    dt = bOEProvider.GetByDateRangeWise(fromDate, toDate, reportCategory);
                    if (dt != null && dt.Rows.Count > 0)
                    {
                        reportDocument.Load(reportPath.BOEDetailReportPath);
                        GetValueWithDate(dt, reportParameter, reportDocument);
                    }
                    else
                    {
                        GetMsg(reportParameter, reportDocument, reportPath);
                    }
                }
                else if (reportCategory == 1)      //// BOE Summary Report /////////////////////
                {
                    dt = bOEProvider.GetByDateRangeWise(fromDate, toDate, reportCategory);
                    if (dt != null && dt.Rows.Count > 0)
                    {
                        reportDocument.Load(reportPath.BOESummaryReportPath);
                        GetValueWithFromToDate(reportParameter, reportDocument, dt, fDate, tDate);
                    }
                    else
                    {
                        GetMsg(reportParameter, reportDocument, reportPath);
                    }
                }
                break;
                #endregion

                #region QA Report
            case ReportType.QAReport:       //////////// For QA report
                var qAQCRequisitionProvider = new QAQCRequisitionProvider();
                fDate = GetNullfDatetime();
                tDate = GetNulltDatetime();
                Date  = GetNullaDatetime();

                dt = qAQCRequisitionProvider.GetDateWiseProductInfo(fDate, tDate, Date, productID);
                if (dt != null && dt.Rows.Count > 0)
                {
                    {
                        //if (reportOption == 1 && adate == null) //All product summary report
                        //{
                        //    reportDocument.Load(reportPath.QAReportPath);
                        //    GetValueWithDate(dt, reportParameter, reportDocument);
                        //}
                        //if (reportOption == 1 && adate == null) //All product summary report
                        //{
                        //    reportDocument.Load(reportPath.QAReportPath);
                        //    GetValueWithDate(dt, reportParameter, reportDocument);
                        //}
                        if (reportOption == 1)
                        {
                            reportDocument.Load(reportPath.QAReportPath);
                            GetValueAGetDate(dt, reportParameter, reportDocument, Date);
                        }
                        else if (reportOption == 2)
                        {
                            reportDocument.Load(reportPath.QAReportPath);
                            GetValueWithFromToDate(reportParameter, reportDocument, dt, fDate, tDate);
                        }
                        //else if (reportOption == 3) // Purchase ID wise report (showing product details).
                        //{
                        //    reportDocument.Load(reportPath.QAReportPath);
                        //    GetValueWithDate(dt, reportParameter, reportDocument, printOption);
                        //}
                    }
                }
                else
                {
                    GetMsg(reportParameter, reportDocument, reportPath);
                }
                break;
                #endregion

                #region Eng. Internal Requisition Report
            case ReportType.EngineeringInternalRequiReport:       //////////// For Eng Requi report
                var engRequisitionProvider = new EngineeringRequisitionProvider();
                var engRequisitionNo       = Request.QueryString["transactionNo"].Trim();
                dt = engRequisitionProvider.GetByID(engRequisitionNo);
                if (dt != null && dt.Rows.Count > 0)
                {
                    {
                        reportDocument.Load(reportPath.EngInternalRequiReportPath);
                        GetValueWithDate(dt, reportParameter, reportDocument);
                    }
                }
                else
                {
                    GetMsg(reportParameter, reportDocument, reportPath);
                }
                break;
                #endregion
            }
        }