Esempio n. 1
0
        public ActionResult Add()
        {
            string roleid    = (string)Session["user_role_id"];
            string userid    = (string)Session["user_au_id"];
            string companyId = (string)Session["company_id"];

            string ConName    = "Receiving";
            string ActionName = "add";

            if ((roleid == null || roleid == string.Empty) && (userid == null || userid == string.Empty) && (companyId == null || companyId == string.Empty))
            {
                Response.Redirect("/Login/Index");
            }
            bool permission = CoreRules.UserPermission(roleid, userid, ConName, ActionName);

            if (!permission)
            {
                Response.Redirect("/Error/Index");
            }

            ViewBag.receive_master_id = "0";

            if (Request.QueryString["receive_master_id"] != null)
            {
                ViewBag.receive_master_id = Request.QueryString["receive_master_id"];
            }
            ViewBag.po_master_id = "0";

            if (Request.QueryString["po_master_id"] != null)
            {
                ViewBag.po_master_id = Request.QueryString["po_master_id"];
            }
            return(View());
        }
        public void GetInternalInvoiceReport(int internal_requisition_master_id, int user_id)
        {
            try
            {
                WebClient wbClient       = new WebClient();
                string    downloadString = CoreRules.httpRequest() + "InternalRequisition/InternalInvoiceReport?internal_requisition_master_id=" + internal_requisition_master_id + "&user_id=" + user_id;
                string    apidata        = wbClient.DownloadString(downloadString);
                var       oDeliAndDis    = JsonConvert.DeserializeObject <List <InternalInvoiceReportModel> >(apidata);
                DataTable dt             = ToDataTable(oDeliAndDis);

                using (var reportDocument = new ReportDocument())
                {
                    reportDocument.Load(Server.MapPath("~/Reports/crystal_view/InternalInvoiceReportData.rpt"));
                    reportDocument.SetDataSource(dt);
                    reportDocument.SummaryInfo.ReportTitle   = "Internal Invoice";
                    reportDocument.SummaryInfo.ReportSubject = "Internal Invoice";
                    reportDocument.SummaryInfo.ReportAuthor  = "WE SCM System";
                    reportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, System.Web.HttpContext.Current.Response, false, "Lot No Print Report" + DateTime.Now.ToString("dd-MM-yyyy_hh-mm_tt"));
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 3
0
        //
        // GET: /Control/
        public ActionResult Index()
        {
            string roleid    = (string)Session["user_role_id"];
            string userid    = (string)Session["user_au_id"];
            string companyId = (string)Session["company_id"];

            string ConName    = "Control";
            string ActionName = "index";

            if (roleid == null || roleid == string.Empty)
            {
                if ((roleid == null || roleid == string.Empty) && (userid == null || userid == string.Empty) && (companyId == null || companyId == string.Empty))
                {
                    Response.Redirect("/Login/Index");
                }
            }
            bool permission = CoreRules.UserPermission(roleid, userid, ConName, ActionName);

            if (!permission)
            {
                Response.Redirect("/Error/Index");
            }

            return(View());
        }
Esempio n. 4
0
        // GET: Admin
        public ActionResult Index()
        {
            string roleid = (string)Session["user_role_id"];
            string userid = (string)Session["user_au_id"];
            string companyId = (string)Session["company_id"];

            string ConName = "Deshboard";
            string ActionName = "index";

            if (string.IsNullOrEmpty(roleid) || string.IsNullOrEmpty(userid) || string.IsNullOrEmpty(companyId))
            {
                Response.Redirect("/Login/Index");
            }
            bool permission = CoreRules.UserPermission(roleid, userid, ConName, ActionName);
            if (!permission)
            {
                try
                {
                    Response.Redirect("/Error/Index");
                }
                catch (Exception ex)
                {
                    Response.Redirect("/Login/Index");
                }
            }

            string OrderCount = "0";//CoreRules.GetAllOrder(int.Parse(companyId));
            string BatchCount = "0";//CoreRules.GetAllBatch(int.Parse(companyId));
            ViewBag.OrderCount = OrderCount;
            ViewBag.BatchCount = BatchCount;
            return View();
        }
Esempio n. 5
0
        private CoreDaemon CreateExampleDaemon(out BlockProvider embeddedBlocks, out IStorageManager storageManager, int?maxHeight = null)
        {
            // retrieve first 10,000 testnet3 blocks
            embeddedBlocks = new BlockProvider("BitSharp.Examples.Blocks.TestNet3.zip");

            // initialize in-memory storage
            storageManager = new MemoryStorageManager();

            // intialize testnet3 rules (ignore script errors, script engine is not and is not intended to be complete)
            var chainParams = new Testnet3Params();
            var rules       = new CoreRules(chainParams)
            {
                IgnoreScriptErrors = true
            };

            // initialize & start core daemon
            var coreDaemon = new CoreDaemon(rules, storageManager)
            {
                MaxHeight = maxHeight, IsStarted = true
            };

            // add embedded blocks
            coreDaemon.CoreStorage.AddBlocks(embeddedBlocks.ReadBlocks());

            // wait for core daemon to finish processing any available data
            coreDaemon.WaitForUpdate();

            return(coreDaemon);
        }
Esempio n. 6
0
    // GET: Admin
    public ActionResult Index()
    {
        string roleid      = (string)Session["user_role_id"];
        string userid      = (string)Session["user_au_id"];
        string companyId   = (string)Session["company_id"];
        string accessToken = (string)Session["AccessToken"];
        string ConName     = "Deshboard";
        string ActionName  = "index";

        if (string.IsNullOrEmpty(roleid) || string.IsNullOrEmpty(userid) || string.IsNullOrEmpty(companyId))
        {
            Response.Redirect("/Login/Index");
        }
        bool permission = CoreRules.UserPermission(roleid, userid, ConName, ActionName, accessToken);

        if (!permission)
        {
            try
            {
                Response.Redirect("/Error/Index");
            }
            catch (Exception ex)
            {
                Response.Redirect("/Login/Index");
            }
        }


        return(View());
    }
Esempio n. 7
0
        public void GetInternalEmiInvoiceReport(int internal_requisition_master_id, int user_id)
        {
            try
            {
                var    wbClient       = new WebClient();
                string downloadString = CoreRules.httpRequest() + "InternalEmiRequisition/GetInternalEmiInvoiceReport?internal_requisition_master_id=" + internal_requisition_master_id + "&user_id=" + user_id;
                var    apidata        = wbClient.DownloadString(downloadString);
                InternalEmiCombinedInvoiceReportModel oDeliAndDis = JsonConvert.DeserializeObject <InternalEmiCombinedInvoiceReportModel>(apidata);
                DataTable dt1 = ToDataTable(oDeliAndDis.InternalInvoiceReportModel);


                using (var reportDocument = new ReportDocument())
                {
                    reportDocument.Load(Server.MapPath("~/Reports/crystal_view/InternalEmiInvoiceReportData.rpt"));
                    reportDocument.SetDataSource(oDeliAndDis.InternalInvoiceReportModel);

                    if (oDeliAndDis.InstallmentDetailsModel.Count > 0)
                    {
                        reportDocument.OpenSubreport("installmentDetailsSubRpt").SetDataSource(oDeliAndDis.InstallmentDetailsModel);
                    }
                    else
                    {
                        reportDocument.OpenSubreport("installmentDetailsSubRpt").SetDataSource(dt1); //if assign list and list is empty then it showing error
                    }

                    reportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, System.Web.HttpContext.Current.Response, false, "Invoice_" + DateTime.Now.ToString("dd-MM-yyyy_hh-mm_tt"));
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 8
0
 public UnitTestRules()
 {
     ChainParams = new UnitTestParams {
         HighestTarget = UnitTestParams.Target0
     };
     coreRules = new CoreRules(ChainParams);
 }
        public void GetRequisitionReport(int requisition_master_id)
        {
            WebClient wbClient       = new WebClient();
            string    downloadString = CoreRules.httpRequest() + "Requisition/GetRequisitionReportById?requisition_master_id=" + requisition_master_id;
            string    apidata        = wbClient.DownloadString(downloadString);

            RequisitionCombinedModel oDeliAndDis = JsonConvert.DeserializeObject <RequisitionCombinedModel>(apidata);
            //convert list to datatable
            DataTable dtMain = ToDataTable(oDeliAndDis.RequisitionReportModels);

            //DataTable dtSub = ToDataTable(oDeliAndDis.RebateReportModels);


            using (var reportDocument = new ReportDocument())
            {
                reportDocument.Load(Server.MapPath("~/Reports/crystal_view/RequisitionReport.rpt"));
                reportDocument.SetDataSource(dtMain);

                //rebate subreport
                //if (oDeliAndDis.RebateReportModels.Count > 0)
                //{
                //    reportDocument.OpenSubreport("rebate").SetDataSource(dtSub);
                //}
                //else
                //{
                //    reportDocument.OpenSubreport("rebate").SetDataSource(dtSub);
                //}

                reportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, System.Web.HttpContext.Current.Response, false, "Requisition Report" + DateTime.Now.ToString("dd-MM-yyyy_hh-mm_tt"));
            }
        }
        public ActionResult Cancel(int delivery_master_id)
        {
            WebClient wbClient       = new WebClient();
            string    downloadString = CoreRules.httpRequest() + "EshopRequisition/CancelEshopRequisition?delivery_master_id=" + delivery_master_id;
            string    apidata        = wbClient.DownloadString(downloadString);

            return(RedirectToAction("Index"));
        }
        public ActionResult RedrictToAdmin()
        {
            // string kk = DateTime.Now.ToString();

            string employeeId      = "";
            string customerId      = "";
            string roleid          = (string)Request.QueryString["role_id"];
            string role_name       = (string)Request.QueryString["role_name"];
            string userid          = (string)Request.QueryString["user_id"];
            string FullName        = (string)Request.QueryString["full_name"];
            string employee_email  = (string)Request.QueryString["employee_email"];
            string employee_name   = (string)Request.QueryString["employee_name"];
            string user_role_name  = (string)Request.QueryString["emp_role_name"];
            bool   is_new_password = (Request.QueryString["is_new_password"] == "1");

            customerId = (string)Request.QueryString["customer_id"];
            employeeId = (string)Request.QueryString["employee_id"];
            string companyId = (string)Request.QueryString["company_id"];
            //  string clientIp = (string)Request.QueryString["clientIp"];
            string branchId    = (string)Request.QueryString["branch_id"];
            string partyId     = (string)Request.QueryString["party_id"];
            string partyTypeId = (string)Request.QueryString["party_type_id"];

            string companyCode = CoreRules.GetCompanyCode(int.Parse(companyId));
            string companyName = CoreRules.getCompanyNameById(int.Parse(companyId));

            // string flagPath = CoreRules.getFlagById(int.Parse(companyId));



            Session["user_role_id"] = roleid;
            Session["role_name"]    = role_name;
            Session["user_au_id"]   = userid;
            Session["full_name"]    = FullName; // changed by asma 20 Feb 2016...
            Session["company_id"]   = companyId;
            Session["branch_id"]    = branchId; // Shawon 20.03.2016
            Session["company_code"] = companyCode;
            Session["company_name"] = companyName;
            // Session["clientIp"] = clientIp;
            Session["employee_id"]     = employeeId;
            Session["customer_id"]     = customerId;
            Session["user_email"]      = employee_email;
            Session["party_id"]        = partyId;//Farzana 29.08.2016
            Session["party_type_id"]   = partyTypeId;
            Session["user_name"]       = employee_name;
            Session["employee_name"]   = employee_name;
            Session["user_role_name"]  = user_role_name;
            Session["is_new_password"] = is_new_password;
            if (is_new_password)
            {
                return(Redirect("/user/ChangeOwnProfile"));
            }
            else
            {
                return(Redirect("/Deshboard/Index"));
            }
        }
        public void GetMonthlyTransferReport(DateTime from_date, DateTime to_date, long from_warehouse_id)
        {
            WebClient wbClient       = new WebClient();
            string    downloadString = CoreRules.httpRequest() + "/ToDelivery/GetMonthlyTransferReport?from_date=" + from_date + "&to_date=" + to_date + "&from_warehouse_id=" + from_warehouse_id;
            string    apidata        = wbClient.DownloadString(downloadString);
            List <MonthlyTransferReportModel> oDeliAndDis = JsonConvert.DeserializeObject <List <MonthlyTransferReportModel> >(apidata);


            using (var reportDocument = new ReportDocument())
            {
                reportDocument.Load(Server.MapPath("~/Reports/crystal_view/MonthlyTransferReport.rpt"));
                reportDocument.SetDataSource(oDeliAndDis);
                reportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, System.Web.HttpContext.Current.Response, false, "" + DateTime.Now.ToString("dd-MM-yyyy_hh-mm_tt"));
            }
        }
        public void GetAllInventoryStockIMEIExcel(long product_id, long color_id, long product_version_id, long warehouse_id)
        {
            WebClient wbClient       = new WebClient();
            string    downloadString = CoreRules.httpRequest() + "Inventory/GetAllInventoryStockExcel?product_id=" + product_id + "&color_id=" + color_id + "&warehouse_id=" + warehouse_id + "&product_version_id=" + product_version_id;
            string    apidata        = wbClient.DownloadString(downloadString);
            List <InventoryStockExcelModel> oDeliAndDis = JsonConvert.DeserializeObject <List <InventoryStockExcelModel> >(apidata);


            using (var reportDocument = new ReportDocument())
            {
                reportDocument.Load(Server.MapPath("~/Reports/crystal_view/InventoryIMEIExcelReport.rpt"));
                reportDocument.SetDataSource(oDeliAndDis);
                reportDocument.ExportToHttpResponse(ExportFormatType.ExcelWorkbook, System.Web.HttpContext.Current.Response, false, "" + DateTime.Now.ToString("dd-MM-yyyy_hh-mm_tt"));
            }
        }
        public void GetAllDeliveredIMEIExcel()
        {
            WebClient wbClient       = new WebClient();
            string    downloadString = CoreRules.httpRequest() + "Inventory/GetAllDeliveredIMEIExcel";
            string    apidata        = wbClient.DownloadString(downloadString);
            List <AllDeliveredIMEI> oAllDeliveredImeis = JsonConvert.DeserializeObject <List <AllDeliveredIMEI> >(apidata);


            using (var reportDocument = new ReportDocument())
            {
                reportDocument.Load(Server.MapPath("~/Reports/crystal_view/AllDeliveredIMEI.rpt"));
                reportDocument.SetDataSource(oAllDeliveredImeis);
                reportDocument.ExportToHttpResponse(ExportFormatType.ExcelWorkbook, System.Web.HttpContext.Current.Response, false, "" + DateTime.Now.ToString("dd-MM-yyyy_hh-mm_tt"));
            }
        }
        public void GetAdaProductInventoryAllExcel()
        {
            WebClient             wbClient       = new WebClient();
            string                downloadString = CoreRules.httpRequest() + "Inventory/GetAdaProductInventoryAllExcel";
            string                apidata        = wbClient.DownloadString(downloadString);
            List <GrnReportModel> oDeliAndDis    = JsonConvert.DeserializeObject <List <GrnReportModel> >(apidata);


            using (var reportDocument = new ReportDocument())
            {
                reportDocument.Load(Server.MapPath("~/Reports/crystal_view/GrnExcelReport.rpt"));
                reportDocument.SetDataSource(oDeliAndDis);
                reportDocument.ExportToHttpResponse(ExportFormatType.ExcelRecord, System.Web.HttpContext.Current.Response, false, "" + DateTime.Now.ToString("dd-MM-yyyy_hh-mm_tt"));
            }
        }
        //grn Excel with details IMEI-------
        public void GetGrnExcelReportByGrnMasterIdProductIdColorId(int grn_master_id, int product_id, int color_id)
        {
            WebClient             wbClient       = new WebClient();
            string                downloadString = CoreRules.httpRequest() + "Grn/GetGrnExcelReportByGrnMasterIdProductIdColorId?grn_master_id=" + grn_master_id + "&product_id=" + product_id + "&color_id=" + color_id;
            string                apidata        = wbClient.DownloadString(downloadString);
            List <GrnReportModel> oDeliAndDis    = JsonConvert.DeserializeObject <List <GrnReportModel> >(apidata);


            using (var reportDocument = new ReportDocument())
            {
                reportDocument.Load(Server.MapPath("~/Reports/crystal_view/GrnExcelReport.rpt"));
                reportDocument.SetDataSource(oDeliAndDis);
                reportDocument.ExportToHttpResponse(ExportFormatType.ExcelRecord, System.Web.HttpContext.Current.Response, false, "" + DateTime.Now.ToString("dd-MM-yyyy_hh-mm_tt"));
            }
        }
        public void GetPartyWiseInventoryDetailsExcel(int product_id, int color_id, int warehouse_id, int party_id)
        {
            WebClient wbClient       = new WebClient();
            string    downloadString = CoreRules.httpRequest() + "Inventory/GetPartyWiseInventoryDetailsExcel?product_id=" + product_id + "&color_id=" + color_id + "&warehouse_id=" + warehouse_id + "&party_id=" + party_id;
            string    apidata        = wbClient.DownloadString(downloadString);
            List <partyWiseStockExcelReportModel> objPartyWiseInventoryDetails = JsonConvert.DeserializeObject <List <partyWiseStockExcelReportModel> >(apidata);


            using (var reportDocument = new ReportDocument())
            {
                reportDocument.Load(Server.MapPath("~/Reports/crystal_view/partyWiseStockExcelReport.rpt"));
                reportDocument.SetDataSource(objPartyWiseInventoryDetails);
                reportDocument.ExportToHttpResponse(ExportFormatType.ExcelRecord, System.Web.HttpContext.Current.Response, false, "" + DateTime.Now.ToString("dd-MM-yyyy_hh-mm_tt"));
            }
        }
Esempio n. 18
0
        public void GetTransferOrderReport(int transfer_order_master_id)
        {
            WebClient            wbClient       = new WebClient();
            string               downloadString = CoreRules.httpRequest() + "TransferOrder/GetTransferOrderReportById?transfer_order_master_id=" + transfer_order_master_id;
            string               apidata        = wbClient.DownloadString(downloadString);
            List <ToReportModel> oDeliAndDis    = JsonConvert.DeserializeObject <List <ToReportModel> >(apidata);


            using (var reportDocument = new ReportDocument())
            {
                reportDocument.Load(Server.MapPath("~/Reports/crystal_view/ToReport.rpt"));
                reportDocument.SetDataSource(oDeliAndDis);
                reportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, System.Web.HttpContext.Current.Response, false, "" + DateTime.Now.ToString("dd-MM-yyyy_hh-mm_tt"));
            }
        }
Esempio n. 19
0
        public void BestSellingProductsReport(DateTime from_date, DateTime to_date)
        {
            WebClient wbClient       = new WebClient();
            string    downloadString = CoreRules.httpRequest() + "/Dashboard/BestSellingProductsReport?from_date=" + from_date + "&to_date=" + to_date;
            string    apidata        = wbClient.DownloadString(downloadString);
            List <BestSellingProductsReportModel> oDeliAndDis = JsonConvert.DeserializeObject <List <BestSellingProductsReportModel> >(apidata);


            using (var reportDocument = new ReportDocument())
            {
                reportDocument.Load(Server.MapPath("~/Reports/crystal_view/BestSellingProductReport.rpt"));
                reportDocument.SetDataSource(oDeliAndDis);
                reportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, System.Web.HttpContext.Current.Response, false, "" + DateTime.Now.ToString("dd-MM-yyyy_hh-mm_tt"));
            }
        }
        public void GetInventoryReport(int warehouse_id, int product_id, int color_id, string from_date, string to_date, int user_id)
        {
            WebClient wbClient       = new WebClient();
            string    downloadString = CoreRules.httpRequest() + "Inventory/GetInventoryReport?warehouse_id=" + warehouse_id + "&product_id=" + product_id + "&color_id=" + color_id + "&from_date=" + from_date + "&to_date=" + to_date + "&user_id=" + user_id + "";
            string    apidata        = wbClient.DownloadString(downloadString);
            List <InventoryReportModels> objInventory = JsonConvert.DeserializeObject <List <InventoryReportModels> >(apidata);


            using (var reportDocument = new ReportDocument())
            {
                reportDocument.Load(Server.MapPath("~/Reports/crystal_view/InventoryReport.rpt"));

                reportDocument.SetDataSource(objInventory);
                reportDocument.ExportToHttpResponse(ExportFormatType.ExcelWorkbook, System.Web.HttpContext.Current.Response, false, "" + DateTime.Now.ToString("dd-MM-yyyy_hh-mm_tt"));
            }
        }
        public void GetPartyWiseStockReport(int party_id, int user_id)
        {
            WebClient wbClient       = new WebClient();
            string    downloadString = CoreRules.httpRequest() + "Inventory/PartyWiseStockReport?party_id=" + party_id + "&user_id=" + user_id + " ";
            string    apidata        = wbClient.DownloadString(downloadString);
            List <InventoryStockModel> objInventoryStock = JsonConvert.DeserializeObject <List <InventoryStockModel> >(apidata);


            using (var reportDocument = new ReportDocument())
            {
                reportDocument.Load(Server.MapPath("~/Reports/crystal_view/PartyWiseStockReport.rpt"));

                reportDocument.SetDataSource(objInventoryStock);
                reportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, System.Web.HttpContext.Current.Response, false, "" + DateTime.Now.ToString("dd-MM-yyyy_hh-mm_tt"));
            }
        }
        public void GetRetailerDeliveryInformationPdf(string from_date, string to_date, int party_id)
        {
            WebClient wbClient       = new WebClient();
            string    downloadString = CoreRules.httpRequest() + "RetailerDelivery/GetRetailerDeliveryformation?from_date=" +
                                       from_date + "&to_date=" + to_date + "&party_id=" + party_id + "";
            string apidata = wbClient.DownloadString(downloadString);
            List <RetailerDeliveryInfoModel> oDeliAndDis = JsonConvert.DeserializeObject <List <RetailerDeliveryInfoModel> >(apidata);


            using (var reportDocument = new ReportDocument())
            {
                reportDocument.Load(Server.MapPath("~/Reports/crystal_view/RetailerDeliveryInfoReport.rpt"));
                reportDocument.SetDataSource(oDeliAndDis);
                reportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, System.Web.HttpContext.Current.Response, false, "" + DateTime.Now.ToString("dd-MM-yyyy_hh-mm_tt"));
            }
        }
        public void GetSalableAndNonSalableStock()
        {
            WebClient wbClient       = new WebClient();
            string    downloadString = CoreRules.httpRequest() + "Report/GetSalableAndNonSalableStock";
            string    apidata        = wbClient.DownloadString(downloadString);
            List <SalableAndNonSalableStockModel> objSalableQuantity = JsonConvert.DeserializeObject <List <SalableAndNonSalableStockModel> >(apidata);


            using (var reportDocument = new ReportDocument())
            {
                reportDocument.Load(Server.MapPath("~/Reports/crystal_view/SalableNonSalableQuantity.rpt"));

                reportDocument.SetDataSource(objSalableQuantity);
                reportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, System.Web.HttpContext.Current.Response, false, "" + DateTime.Now.ToString("dd-MM-yyyy_hh-mm_tt"));
            }
        }
Esempio n. 24
0
        public void GetPaymentHistoryReport(string from_date, string to_date)
        {
            WebClient wbClient       = new WebClient();
            string    downloadString = CoreRules.httpRequest() + "Receive/GetPaymentHistory?from_date=" + from_date + "&to_date=" + to_date + "";
            string    apidata        = wbClient.DownloadString(downloadString);
            List <PaymentHistoryModel> objPaymentHistory = JsonConvert.DeserializeObject <List <PaymentHistoryModel> >(apidata);


            using (var reportDocument = new ReportDocument())
            {
                reportDocument.Load(Server.MapPath("~/Reports/crystal_view/PaymentHistory.rpt"));

                reportDocument.SetDataSource(objPaymentHistory);
                reportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, System.Web.HttpContext.Current.Response, false, "" + DateTime.Now.ToString("dd-MM-yyyy_hh-mm_tt"));
            }
        }
Esempio n. 25
0
        public void GetMoneyReceiptReport(int receive_id)
        {
            WebClient wbClient       = new WebClient();
            string    downloadString = CoreRules.httpRequest() + "Receive/GetMoneyReceiptReport?receive_id=" + receive_id;
            string    apidata        = wbClient.DownloadString(downloadString);
            List <MoneyReceiptModelsOfReceiveReport> objMoneyReceipt = JsonConvert.DeserializeObject <List <MoneyReceiptModelsOfReceiveReport> >(apidata);


            using (var reportDocument = new ReportDocument())
            {
                reportDocument.Load(Server.MapPath("~/Reports/crystal_view/ReceiveReport.rpt"));

                reportDocument.SetDataSource(objMoneyReceipt);
                reportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, System.Web.HttpContext.Current.Response, false, "" + DateTime.Now.ToString("dd-MM-yyyy_hh-mm_tt"));
            }
        }
Esempio n. 26
0
        public void GetProductLiftingAndPaymentSummeryDetailsReport(string from_date, string to_date, int party_id)
        {
            WebClient wbClient       = new WebClient();
            string    downloadString = CoreRules.httpRequest() + "Receive/ProductLiftingAndPaymentSummery?from_date=" + from_date + "&to_date=" + to_date + "&party_id=" + party_id + "";
            string    apidata        = wbClient.DownloadString(downloadString);
            List <ProductLiftingAndPaymentSummery> LiftingAndPayment = JsonConvert.DeserializeObject <List <ProductLiftingAndPaymentSummery> >(apidata);


            using (var reportDocument = new ReportDocument())
            {
                reportDocument.Load(Server.MapPath("~/Reports/crystal_view/ProductLiftingAndPaymentSummeryDetails.rpt"));

                reportDocument.SetDataSource(LiftingAndPayment);
                reportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, System.Web.HttpContext.Current.Response, false, "" + DateTime.Now.ToString("dd-MM-yyyy_hh-mm_tt"));
            }
        }
        public void AccountsReportPDF(string fromDate, string toDate, long partyTypeId, long partyId, string receivedInvoiceNo)
        {
            WebClient wbClient       = new WebClient();
            string    downloadString = CoreRules.httpRequest() + "Report/GetAccountsReport?fromDate=" + fromDate + "&toDate=" + toDate + "&partyTypeId=" + partyTypeId + "&partyId=" + partyId + "&receivedInvoiceNo=" + receivedInvoiceNo + "";
            string    apidata        = wbClient.DownloadString(downloadString);
            List <AccountsReportModel> objAccountsReportModel = JsonConvert.DeserializeObject <List <AccountsReportModel> >(apidata);


            using (var reportDocument = new ReportDocument())
            {
                reportDocument.Load(Server.MapPath("~/Reports/crystal_view/AccountsReport.rpt"));

                reportDocument.SetDataSource(objAccountsReportModel);
                reportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, System.Web.HttpContext.Current.Response, false, "" + DateTime.Now.ToString("dd-MM-yyyy_hh-mm_tt"));
            }
        }
        public void GetPurchaseOrderListPdf(string from_date, string to_date)
        {
            WebClient wbClient       = new WebClient();
            string    downloadString = CoreRules.httpRequest() + "PurchaseOrder/GetPurchaseOrderExcelData?from_date=" +
                                       from_date + "&to_date=" + to_date + "";
            string apidata = wbClient.DownloadString(downloadString);
            List <PurchaseOrderExcelModel> oDeliAndDis = JsonConvert.DeserializeObject <List <PurchaseOrderExcelModel> >(apidata);


            using (var reportDocument = new ReportDocument())
            {
                reportDocument.Load(Server.MapPath("~/Reports/crystal_view/PoSummeryReport.rpt"));
                reportDocument.SetDataSource(oDeliAndDis);
                reportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, System.Web.HttpContext.Current.Response, false, "" + DateTime.Now.ToString("dd-MM-yyyy_hh-mm_tt"));
            }
        }
        public void GetDailySalesReportPDF(string fromDate, string toDate, long productCategoryId, long productId)
        {
            WebClient wbClient       = new WebClient();
            string    downloadString = CoreRules.httpRequest() + "Report/GetDailySalesReportPDF?fromDate=" + fromDate + "&toDate=" + toDate + "&productCategoryId=" + productCategoryId + "&productId=" + productId + "";
            string    apidata        = wbClient.DownloadString(downloadString);
            List <DailySalesReportModel> objDailySalesTransaction = JsonConvert.DeserializeObject <List <DailySalesReportModel> >(apidata);


            using (var reportDocument = new ReportDocument())
            {
                reportDocument.Load(Server.MapPath("~/Reports/crystal_view/DailySalesReport.rpt"));

                reportDocument.SetDataSource(objDailySalesTransaction);
                reportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, System.Web.HttpContext.Current.Response, false, "" + DateTime.Now.ToString("dd-MM-yyyy_hh-mm_tt"));
            }
        }
        //invoice wise imei
        public void GetInvoiceWiseImeiReportPDF(long InvoiceMasterId)
        {
            WebClient wbClient       = new WebClient();
            string    downloadString = CoreRules.httpRequest() + "Report/GetInvoiceWiseImeiReportPDF?InvoiceMasterId=" + InvoiceMasterId + " ";
            string    apidata        = wbClient.DownloadString(downloadString);
            List <InvoiceWiseImeiModel> objDailySalesTransaction = JsonConvert.DeserializeObject <List <InvoiceWiseImeiModel> >(apidata);


            using (var reportDocument = new ReportDocument())
            {
                reportDocument.Load(Server.MapPath("~/Reports/crystal_view/InvoiceWiseImei.rpt"));

                reportDocument.SetDataSource(objDailySalesTransaction);
                reportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, System.Web.HttpContext.Current.Response, false, "" + DateTime.Now.ToString("dd-MM-yyyy_hh-mm_tt"));
            }
        }