示例#1
0
        public FileResult PrintInvoice_Read()
        {
            string _classID        = System.Web.HttpContext.Current.Session["InvoiceID"].ToString();
            string _PrintDublicate = System.Web.HttpContext.Current.Session["PrintDublicate"].ToString();
            bool   bit             = false;

            if (_PrintDublicate == "True")
            {
                bit = true;
            }
            if (_classID.Equals("-1"))
            {
                Session["InvoiceID"] = -1;
                return(null);
            }
            else
            {
                ReIssued reIssued = new ReIssued();
                reIssued.Invoice_ID      = Convert.ToInt64(_classID);
                reIssued.Re_Issued_By    = CurrentUser.NameIdentifierInt64;
                reIssued.Re_Issued_Date  = DateTime.Now;
                reIssued.Organization_ID = CurrentUser.CompanyID;
                reIssued.ID = _CustomerBAL.create_InvoiceReIssueBAL(reIssued);
                InvoiceHistory invoiceHistory = new InvoiceHistory();
                invoiceHistory.History_Name    = "Invoice Issued";
                invoiceHistory.Type            = InvoiceStatus.InvoiceReIssued;
                invoiceHistory.Description     = "";
                invoiceHistory.Invoice_Number  = Convert.ToInt64(_classID);
                invoiceHistory.User_ID         = CurrentUser.NameIdentifierInt64;
                invoiceHistory.Organization_ID = CurrentUser.CompanyID;
                invoiceHistory.Date_TIME       = DateTime.Now;
                var          x = _CustomerBAL.create_InvoiceHistoryBAL(invoiceHistory);
                ReportViewer ReportViewerRSFReports = new ReportViewer();
                ReportViewerRSFReports.Height   = Unit.Parse("100%");
                ReportViewerRSFReports.Width    = Unit.Parse("100%");
                ReportViewerRSFReports.CssClass = "table";
                var rptPath = Server.MapPath(@"../Report/INO_InvoiceRecipt.rdlc");
                ReportViewerRSFReports.LocalReport.ReportPath = rptPath;
                long      cID = Convert.ToInt64(CurrentUser.CompanyID);
                DataTable dt  = _CustomerBAL.GetInvoiceReportsBAL(Convert.ToInt64(_classID), Convert.ToInt64(CurrentUser.CompanyID), bit);
                ReportViewerRSFReports.ProcessingMode = ProcessingMode.Local;
                ReportViewerRSFReports.LocalReport.DataSources.Clear();
                ReportViewerRSFReports.LocalReport.EnableExternalImages = true;
                List <OrganizationModel> logoPath  = _PersonBAL.GetOrganizationLogo(CurrentUser.CompanyID);
                ReportParameter          paramLogo = new ReportParameter();
                paramLogo.Name = "Picture";
                string imagePath = new Uri(Server.MapPath(@"~/" + logoPath.FirstOrDefault().Logo)).AbsoluteUri;
                paramLogo.Values.Add(imagePath);
                ReportViewerRSFReports.LocalReport.SetParameters(paramLogo);
                ReportViewerRSFReports.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", dt));
                ReportViewerRSFReports.LocalReport.Refresh();
                byte[] mybytes = ReportViewerRSFReports.LocalReport.Render(format: "PDF", deviceInfo: "");
                Session["InvoiceID"]      = -1;
                Session["PrintDublicate"] = false;
                return(File(mybytes, System.Net.Mime.MediaTypeNames.Application.Octet, "Invoice.pdf"));
            }
        }
示例#2
0
        public long create_InvoiceReIssueDAL(ReIssued invoiceDetail)
        {
            var date       = DateTime.Now.ToString("yyyy-MM-dd") + " " + CommonUtility.PersonFlagsClearingTime();
            var parameters = new[] { ParamBuilder.Par("ID", 0) };

            return(ExecuteInt64withOutPutparameterSp("INO_Create_InvoiceIssue", parameters,
                                                     ParamBuilder.Par("@InvoiceID", invoiceDetail.Invoice_ID),
                                                     ParamBuilder.Par("@ReIssuedBy", invoiceDetail.Re_Issued_By),
                                                     ParamBuilder.Par("@Date", invoiceDetail.Re_Issued_Date),
                                                     ParamBuilder.Par("@OrganizationID", invoiceDetail.Organization_ID)

                                                     ));
        }
示例#3
0
 public long create_InvoiceReIssueBAL(ReIssued invoiceReIssue)
 {
     return(DAL.create_InvoiceReIssueDAL(invoiceReIssue));
 }