public ContentResult GetReportDates(int reportId, DateTime from, DateTime to, string customer, bool?nonCash) { var report = GetReport(reportId); from = DateTime.SpecifyKind(from, DateTimeKind.Utc); to = DateTime.SpecifyKind(to, DateTimeKind.Utc); var rptDef = new ReportQuery(report, from, to, customer, nonCash); var oColumnTypes = new List <string>(); AConnection oDB = DbConnectionGenerator.Get(); var reportHandler = new ReportHandler(oDB); bool isError; ATag data = reportHandler.GetReportData(report, rptDef, oColumnTypes, out isError); return(new ContentResult { Content = Newtonsoft.Json.JsonConvert.SerializeObject(new { report = data.ToString(), columns = oColumnTypes, }), ContentType = "application/json", }); } // GetReportDates
/// <summary> /// 打印处理 /// </summary> /// <param name="orderHeadNoStr">订购单号</param> /// <param name="handleTypeInt">打印处理类型:1 预览 2 打印 3 设计</param> public void PrintHandle(string orderHeadNoStr, int handleTypeInt) { DataSet ds = new DataSet(); DataTable headTable = BaseSQL.GetTableBySql(string.Format("select * from V_Prn_PUR_InquiryHead where PIHeadNo = '{0}' order by AutoId", orderHeadNoStr)); headTable.TableName = "InquiryHead"; for (int i = 0; i < headTable.Columns.Count; i++) { #region 设定主表显示的标题 switch (headTable.Columns[i].ColumnName) { case "PIHeadNo": headTable.Columns[i].Caption = "询价单号"; break; case "OrderHeadDate": headTable.Columns[i].Caption = "单据日期"; break; case "BussinessBaseNo": headTable.Columns[i].Caption = "往来方编号"; break; case "BussinessBaseText": headTable.Columns[i].Caption = "往来方名称"; break; case "BussAddress": headTable.Columns[i].Caption = "往来方公司地址"; break; case "BussPhoneNo": headTable.Columns[i].Caption = "往来方电话"; break; case "BussFaxNo": headTable.Columns[i].Caption = "往来方传真"; break; case "BussContact": headTable.Columns[i].Caption = "往来方联系人"; break; case "Tax": headTable.Columns[i].Caption = "税率"; break; case "DepartmentNo": headTable.Columns[i].Caption = "部门编号"; break; case "DepartmentName": headTable.Columns[i].Caption = "部门名称"; break; case "ProjectNo": headTable.Columns[i].Caption = "项目号"; break; case "ProjectName": headTable.Columns[i].Caption = "项目名称"; break; case "StnNo": headTable.Columns[i].Caption = "站号"; break; case "Prepared": headTable.Columns[i].Caption = "制单人"; break; case "PreparedIp": headTable.Columns[i].Caption = "制单人IP"; break; case "Modifier": headTable.Columns[i].Caption = "修改人"; break; case "ModifierIp": headTable.Columns[i].Caption = "修改人IP"; break; case "ModifierTime": headTable.Columns[i].Caption = "修改时间"; break; case "PIRemark": headTable.Columns[i].Caption = "备注"; break; } #endregion } ds.Tables.Add(headTable); DataTable listTable = BaseSQL.GetTableBySql(string.Format("select *, ROW_NUMBER() over (order by AutoId) as RowNum from V_Prn_PUR_InquiryList where PIHeadNo = '{0}' order by AutoId", orderHeadNoStr)); listTable.TableName = "InquiryList"; for (int i = 0; i < listTable.Columns.Count; i++) { #region 设定子表显示的标题 switch (listTable.Columns[i].ColumnName) { case "RowNum": listTable.Columns[i].Caption = "行号"; break; case "PIHeadNo": listTable.Columns[i].Caption = "询价单号"; break; case "CodeNo": listTable.Columns[i].Caption = "物料编号"; break; case "CodeFileName": listTable.Columns[i].Caption = "零件编号"; break; case "CodeName": listTable.Columns[i].Caption = "零件名称"; break; case "CatgName": listTable.Columns[i].Caption = "分类名称"; break; case "CatgDescription": listTable.Columns[i].Caption = "分类说明"; break; case "CodeSpec": listTable.Columns[i].Caption = "规格型号"; break; case "CodeWeight": listTable.Columns[i].Caption = "重量"; break; case "MaterialVersion": listTable.Columns[i].Caption = "物料版本"; break; case "LibName": listTable.Columns[i].Caption = "Level 1"; break; case "MaterialCategory": listTable.Columns[i].Caption = "Level 2"; break; case "MaterialName": listTable.Columns[i].Caption = "Level 3"; break; case "Brand": listTable.Columns[i].Caption = "品牌"; break; case "FinishCatg": listTable.Columns[i].Caption = "表面处理"; break; case "LevelCatg": listTable.Columns[i].Caption = "加工等级"; break; case "Unit": listTable.Columns[i].Caption = "单位"; break; case "Qty": listTable.Columns[i].Caption = "数量"; break; case "Price": listTable.Columns[i].Caption = "单价"; break; case "Amount": listTable.Columns[i].Caption = "金额"; break; case "Tax": listTable.Columns[i].Caption = "税率"; break; case "TaxAmount": listTable.Columns[i].Caption = "税额"; break; case "SumAmount": listTable.Columns[i].Caption = "价税合计"; break; case "Remark": listTable.Columns[i].Caption = "备注"; break; } #endregion } ds.Tables.Add(listTable); ReportHandler rptHandler = new ReportHandler(); List <DevExpress.XtraReports.Parameters.Parameter> paralist = rptHandler.GetSystemInfo_ParamList(); rptHandler.XtraReport_Handle("PUR_InquiryHead", ds, paralist, handleTypeInt); }
public ReportController() { _reportHandler = new ReportHandler(); }
/// <summary> /// 打印处理 /// </summary> /// <param name="psNoStr">生产计划单号</param> /// <param name="handleTypeInt">打印处理类型:1 预览 2 打印 3 设计</param> public void PrintHandle(string psNoStr, int handleTypeInt) { DataSet ds = new DataSet(); DataTable headTable = BaseSQL.GetTableBySql(string.Format("select * from V_Prn_PB_ProductionSchedule where PsNo = '{0}' order by AutoId", psNoStr)); headTable.TableName = "ProductionScheduleHead"; for (int i = 0; i < headTable.Columns.Count; i++) { #region 设定主表显示的标题 switch (headTable.Columns[i].ColumnName) { case "PsNo": headTable.Columns[i].Caption = "生产计划单号"; break; case "SalesOrderNo": headTable.Columns[i].Caption = "销售单号"; break; case "CurrentDate": headTable.Columns[i].Caption = "单据日期"; break; case "ReqDate": headTable.Columns[i].Caption = "需求日期"; break; case "PlannedText": headTable.Columns[i].Caption = "计划项"; break; case "PsState": headTable.Columns[i].Caption = "单据状态"; break; case "PsStateDesc": headTable.Columns[i].Caption = "单据状态描述"; break; case "Prepared": headTable.Columns[i].Caption = "制单人"; break; case "PreparedIp": headTable.Columns[i].Caption = "制单人IP"; break; case "Modifier": headTable.Columns[i].Caption = "修改人"; break; case "ModifierIp": headTable.Columns[i].Caption = "修改人IP"; break; case "ModifierTime": headTable.Columns[i].Caption = "修改时间"; break; case "Remark": headTable.Columns[i].Caption = "备注"; break; case "GetTime": headTable.Columns[i].Caption = "数据插入时间"; break; } #endregion } ds.Tables.Add(headTable); DataTable listTable = BaseSQL.GetTableBySql(string.Format("select *, ROW_NUMBER() over (order by AutoId) as RowNum from V_Prn_PB_ProductionScheduleBomManage where PsNo = '{0}' order by AutoId", psNoStr)); listTable.TableName = "ProductionScheduleBomList"; for (int i = 0; i < listTable.Columns.Count; i++) { #region 设定子表显示的标题 switch (listTable.Columns[i].ColumnName) { case "RowNum": listTable.Columns[i].Caption = "行号"; break; case "PsNo": listTable.Columns[i].Caption = "生产计划单号"; break; case "SalesOrderNo": listTable.Columns[i].Caption = "销售单号"; break; case "PbBomNo": listTable.Columns[i].Caption = "设计Bom编号"; break; case "CodeNo": listTable.Columns[i].Caption = "物料编号"; break; case "CodeFileName": listTable.Columns[i].Caption = "零件编号"; break; case "CodeName": listTable.Columns[i].Caption = "零件名称"; break; case "CatgName": listTable.Columns[i].Caption = "分类名称"; break; case "CatgDescription": listTable.Columns[i].Caption = "分类说明"; break; case "CodeSpec": listTable.Columns[i].Caption = "规格型号"; break; case "CodeWeight": listTable.Columns[i].Caption = "重量"; break; case "MaterialVersion": listTable.Columns[i].Caption = "物料版本"; break; case "LibName": listTable.Columns[i].Caption = "Level 1"; break; case "MaterialCategory": listTable.Columns[i].Caption = "Level 2"; break; case "MaterialName": listTable.Columns[i].Caption = "Level 3"; break; case "Brand": listTable.Columns[i].Caption = "品牌"; break; case "FinishCatg": listTable.Columns[i].Caption = "表面处理"; break; case "LevelCatg": listTable.Columns[i].Caption = "加工等级"; break; case "Unit": listTable.Columns[i].Caption = "单位"; break; case "GetTime": listTable.Columns[i].Caption = "数据插入时间"; break; case "PurQty": listTable.Columns[i].Caption = "采购数量"; break; case "HasLevel": listTable.Columns[i].Caption = "是否有子节点"; break; case "BomTypeName": listTable.Columns[i].Caption = "类型名称"; break; } #endregion } ds.Tables.Add(listTable); ReportHandler rptHandler = new ReportHandler(); List <DevExpress.XtraReports.Parameters.Parameter> paralist = rptHandler.GetSystemInfo_ParamList(); rptHandler.XtraReport_Handle("PB_ProductionSchedule", ds, paralist, handleTypeInt); }
public NpgTestDataInitializer(ReportHandler reportHandler) : base(reportHandler) { }
public NpgsqlDataSheetCreator(ReportHandler reportHandler) : base(reportHandler) { }
/// <summary> /// 打印处理 /// </summary> /// <param name="autoSalesOrderNoStr">报价单号</param> /// <param name="handleTypeInt">打印处理类型:1 预览 2 打印 3 设计</param> public void PrintHandle(string autoSalesOrderNoStr, int handleTypeInt) { DataSet ds = new DataSet(); DataTable headTable = BaseSQL.GetTableBySql(string.Format("select * from V_Prn_SA_SalesOrder where AutoSalesOrderNo = '{0}' order by AutoId", autoSalesOrderNoStr)); headTable.TableName = "SalesOrder"; for (int i = 0; i < headTable.Columns.Count; i++) { #region 设定主表显示的标题 switch (headTable.Columns[i].ColumnName) { case "AutoSalesOrderNo": headTable.Columns[i].Caption = "销售订单号"; break; case "SalesOrderDate": headTable.Columns[i].Caption = "登记日期"; break; case "ProjectNo": headTable.Columns[i].Caption = "项目号"; break; case "ProjectName": headTable.Columns[i].Caption = "项目名称"; break; case "ParentAutoSalesOrderNo": headTable.Columns[i].Caption = "父级销售订单号"; break; case "ParentProjectNo": headTable.Columns[i].Caption = "父级项目号"; break; case "BussinessBaseNo": headTable.Columns[i].Caption = "客户编号"; break; case "BussinessBaseText": headTable.Columns[i].Caption = "客户名称"; break; case "BussAddress": headTable.Columns[i].Caption = "客户公司地址"; break; case "BussPhoneNo": headTable.Columns[i].Caption = "客户电话"; break; case "BussFaxNo": headTable.Columns[i].Caption = "客户传真"; break; case "BussContact": headTable.Columns[i].Caption = "客户联系人"; break; case "CustomerPoNo": headTable.Columns[i].Caption = "客户PO号"; break; case "CollectionTypeNo": headTable.Columns[i].Caption = "收款方式编号"; break; case "CollectionTypeNoText": headTable.Columns[i].Caption = "收款方式名称"; break; case "Amount": headTable.Columns[i].Caption = "金额"; break; case "Tax": headTable.Columns[i].Caption = "税率"; break; case "TaxAmount": headTable.Columns[i].Caption = "税额"; break; case "SumAmount": headTable.Columns[i].Caption = "价税合计"; break; case "ProjectLeader": headTable.Columns[i].Caption = "项目负责人"; break; case "IsEnd": headTable.Columns[i].Caption = "结账完毕"; break; case "Remark": headTable.Columns[i].Caption = "备注"; break; case "Prepared": headTable.Columns[i].Caption = "制单人"; break; case "PreparedIp": headTable.Columns[i].Caption = "制单人IP"; break; case "Modifier": headTable.Columns[i].Caption = "修改人"; break; case "ModifierIp": headTable.Columns[i].Caption = "修改人IP"; break; case "ModifierTime": headTable.Columns[i].Caption = "修改时间"; break; case "AutoQuotationNo": headTable.Columns[i].Caption = "报价单号"; break; case "QuotationVersions": headTable.Columns[i].Caption = "报价单版本"; break; } #endregion } ds.Tables.Add(headTable); ReportHandler rptHandler = new ReportHandler(); List <DevExpress.XtraReports.Parameters.Parameter> paralist = rptHandler.GetSystemInfo_ParamList(); rptHandler.XtraReport_Handle("SA_SalesOrder", ds, paralist, handleTypeInt); }
private void btnSubmitAll_Click(object sender, EventArgs e) { decimal GAmount = 0; decimal DAmount = 0; decimal TotalAmount = 0; decimal GridTotalAmount = 0; List <ProductReceiptMapVM> productReceiptMapVMs = new List <ProductReceiptMapVM>(); ProductReceiptMapVM tempProductReceipt; ReceiptVM receipt = new ReceiptVM() { Id = 0, BSPId = this.selectedBSP.Id, Remark = "", Products = new List <ProductReceiptMapVM>(), }; foreach (DataGridViewRow row in receiptGridView.Rows) { tempProductReceipt = new ProductReceiptMapVM(); ProductVM product = JsonConvert.DeserializeObject <ProductVM>(row.Cells[9].Value.ToString()); GridTotalAmount += Convert.ToDecimal(row.Cells[8].Value); tempProductReceipt.ProductId = product.Id; tempProductReceipt.product = product; tempProductReceipt.ReceiptId = 0; tempProductReceipt.Quantity = Convert.ToInt32(row.Cells[4].Value); tempProductReceipt.ItemPrice = Convert.ToDecimal(row.Cells[5].Value); tempProductReceipt.ItemDiscountedPrice = Convert.ToDecimal(row.Cells[7].Value); productReceiptMapVMs.Add(tempProductReceipt); GAmount += tempProductReceipt.ItemPrice.Value * tempProductReceipt.Quantity; DAmount += (tempProductReceipt.ItemPrice.Value - tempProductReceipt.ItemDiscountedPrice.Value) * tempProductReceipt.Quantity; TotalAmount += tempProductReceipt.ItemDiscountedPrice.Value * tempProductReceipt.Quantity; } receipt.TotalAmount = GridTotalAmount; receipt.Products = productReceiptMapVMs; using (var amountValidation = new AmountValidationPopup(receipt, this)) using (var reportBll = new ReportHandler()) { var result = amountValidation.ShowDialog(); if (result == DialogResult.OK) { int returnValue = amountValidation.retrunValue; string returnReference = amountValidation.retrunReference; if (returnValue > 0) { DataTable dt = this.AddValiesToDataTable(receipt); /* print report */ var reportParameters = this.GetParameterJsonObject(returnReference); reportBll.ViewReport("billReceipt", reportParameters, dt); /* Refresh page */ this.clearProductForm(); this.ProductFormFieldValidation(); isReceiptFormEnable = false; cmbPhoneNumber.Enabled = true; txtName.Enabled = true; txtAddress.Enabled = true; this.initializeProductDropdowns(); this.initializeReceptTable(); this.bspFormReset(); this.resetTable(); } else { MessageBox.Show("Some error happen. Please try again"); } } } }
static void Main(string[] args) { ILogger nLogger = LogManager.GetLogger("Inventory.Console Logger"); nLogger.Info("Starting console app"); string outputLocation = "c:/Temp"; string keyFileLocation = "c:/Temp"; string asinFilterListLocation = "c:/Temp"; var appSettings = ConfigurationManager.AppSettings; outputLocation = appSettings["outputLocation"]; keyFileLocation = appSettings["keyFileLocation"]; asinFilterListLocation = appSettings["asinFilterListLocation"]; nLogger.Info("outputLocation: " + outputLocation); nLogger.Info("keyFileLocation: " + keyFileLocation); nLogger.Info("asinFilterListLocation: " + asinFilterListLocation); string keyData = File.ReadAllText(keyFileLocation); ServiceContext serviceContext = new ServiceContext(); serviceContext = JsonConvert.DeserializeObject <ServiceContext>(keyData); Console.WriteLine("month (1-12)"); string m = Console.ReadLine(); nLogger.Info("month: " + m); Console.WriteLine("year "); string y = Console.ReadLine(); nLogger.Info("year: " + y); int month; int year; DateTime date = DateTime.Now.Date; if (!Int32.TryParse(m, out month)) { month = date.Month; } if (!Int32.TryParse(y, out year)) { year = date.Year; } DateTime startDate = new DateTime(year, month, 1); DateTime endDate = startDate.AddMonths(1); try { ReportHandler reportHandler = new ReportHandler(serviceContext, nLogger); ReportManager reportManager = new ReportManager(reportHandler, serviceContext, nLogger); ReportBuilder reportBuilder = new ReportBuilder(); nLogger.Info("getting ordersReport"); GetReportResult ordersReport = reportManager.GetReport(ReportType._GET_FLAT_FILE_ALL_ORDERS_DATA_BY_ORDER_DATE_, startDate, endDate, outputLocation); nLogger.Info("getting inventoryReport"); GetReportResult inventoryReport = reportManager.GetReport(ReportType._GET_FBA_MYI_ALL_INVENTORY_DATA_, DateTime.Now.Date.AddDays(-1), DateTime.Now.Date, outputLocation); nLogger.Info("getting ordersTable"); DataTable ordersTable = Util.StringToDataTable(ordersReport.Content); nLogger.Info("getting inventoryTable"); DataTable inventoryTable = Util.StringToDataTable(inventoryReport.Content); nLogger.Info("calling JoinInventoryAndOrders"); IEnumerable <SalesInventoryReportItem> reportItems = reportBuilder.JoinInventoryAndOrders(inventoryTable, ordersTable, startDate); nLogger.Info(string.Format("SalesInventoryReportItem report created, Count: {0}", reportItems.Count())); nLogger.Info("GetAsinFilterList"); IList <string> asinFilterList = reportManager.GetAsinFilterList(asinFilterListLocation); nLogger.Info(string.Format("asinFilterList, Count: {0}", asinFilterList.Count())); nLogger.Info("filtering by asins"); reportItems = reportManager.FilterReportByAsins(reportItems.ToList(), asinFilterList); string writePath = reportHandler.CreateFileLocation(outputLocation, serviceContext.SellerId, "InventoryAndOrders", startDate, endDate); nLogger.Info("SalesInventoryReportItem report path: " + writePath); Directory.CreateDirectory(Path.GetDirectoryName(writePath)); using (var csv = new CsvWriter(new StreamWriter(writePath))) { csv.WriteRecords(reportItems); } nLogger.Info("csv written"); } catch (Exception e) { nLogger.Error(e); Console.WriteLine(e.Message); } Console.WriteLine("Report Complete."); Console.ReadKey(); }
public static void cleanup() { ReportHandler.FlushReport(); }
public void SetupTest() { ReportHandler.CreateTest(TestContext.TestName); }
public static void Setup(TestContext context) { var dir = context.TestRunDirectory; ReportHandler.SetupExtentReport("myreport", "hello", dir); }
/// <summary> /// 打印处理 /// </summary> /// <param name="settleAccountNoStr">结账单号</param> /// <param name="handleTypeInt">打印处理类型:1 预览 2 打印 3 设计</param> public void PrintHandle(string settleAccountNoStr, int handleTypeInt) { DataSet ds = new DataSet(); DataTable headTable = BaseSQL.GetTableBySql(string.Format("select * from V_Prn_SA_SettleAccountsHead where SettleAccountNo = '{0}' order by AutoId", settleAccountNoStr)); headTable.TableName = "SettleAccountsHead"; for (int i = 0; i < headTable.Columns.Count; i++) { #region 设定主表显示的标题 switch (headTable.Columns[i].ColumnName) { case "SettleAccountNo": headTable.Columns[i].Caption = "结账单号"; break; case "SettleAccountDate": headTable.Columns[i].Caption = "登记日期"; break; case "DepartmentNo": headTable.Columns[i].Caption = "部门编号"; break; case "DepartmentName": headTable.Columns[i].Caption = "部门名称"; break; case "BussinessBaseNo": headTable.Columns[i].Caption = "客户编号"; break; case "BussinessBaseText": headTable.Columns[i].Caption = "客户名称"; break; case "BussAddress": headTable.Columns[i].Caption = "客户公司地址"; break; case "BussPhoneNo": headTable.Columns[i].Caption = "客户电话"; break; case "BussFaxNo": headTable.Columns[i].Caption = "客户传真"; break; case "BussContact": headTable.Columns[i].Caption = "客户联系人"; break; case "IsVoucher": headTable.Columns[i].Caption = "生成凭证"; break; case "Remark": headTable.Columns[i].Caption = "备注"; break; case "Prepared": headTable.Columns[i].Caption = "制单人"; break; case "PreparedIp": headTable.Columns[i].Caption = "制单人IP"; break; case "Modifier": headTable.Columns[i].Caption = "修改人"; break; case "ModifierIp": headTable.Columns[i].Caption = "修改人IP"; break; case "ModifierTime": headTable.Columns[i].Caption = "修改时间"; break; } #endregion } ds.Tables.Add(headTable); DataTable listTable = BaseSQL.GetTableBySql(string.Format("select *, ROW_NUMBER() over (order by AutoId) as RowNum from V_Prn_SA_SettleAccountsList where SettleAccountNo = '{0}' order by AutoId", settleAccountNoStr)); listTable.TableName = "SettleAccountsList"; for (int i = 0; i < listTable.Columns.Count; i++) { #region 设定子表显示的标题 switch (listTable.Columns[i].ColumnName) { case "RowNum": listTable.Columns[i].Caption = "行号"; break; case "SettleAccountNo": listTable.Columns[i].Caption = "结账单号"; break; case "AutoSalesOrderNo": listTable.Columns[i].Caption = "销售订单号"; break; case "Amount": listTable.Columns[i].Caption = "金额"; break; case "Tax": listTable.Columns[i].Caption = "税率"; break; case "TaxAmount": listTable.Columns[i].Caption = "税额"; break; case "SumAmount": listTable.Columns[i].Caption = "价税合计"; break; case "Remark": listTable.Columns[i].Caption = "备注"; break; } #endregion } ds.Tables.Add(listTable); ReportHandler rptHandler = new ReportHandler(); List <DevExpress.XtraReports.Parameters.Parameter> paralist = rptHandler.GetSystemInfo_ParamList(); rptHandler.XtraReport_Handle("SA_SettleAccountsHead", ds, paralist, handleTypeInt); }
public ReportByConstructionController(ReportHandler reportHandler) { ReportHandler = reportHandler; }
public void Start() { XmlConfigurator.Configure(); var uc = new UnityContainer(); ServiceLocator.SetLocatorProvider(() => new UnityServiceLocator(uc)); //временное решение (todo испльзовать IUnityContainer+NancyFX) //var sm = new SessionManager(); //uc.RegisterInstance(sm); bus = new Bus(); bus.Start(); bus.OnMessageReceived += (se, ea) => { //1. filter //2. signalR notifications? logger.Debug("получено сообщение из шины"); }; bus.OnHandlerRegister += (se, ea) => { string what = ea.Message.body.what; bool adminOnly = ea.Message.body.adminOnly; string exchange = ea.Message.body.exchange; }; bus.OnNotifyMessageReceived += (se, ea) => { try { if (ea.Message.head.what.StartsWith("mailer")) { logger.Debug(string.Format("получена задача {0} для {1} объектов", ea.Message.head.what, ea.Message.body.objectIds.Count)); var ids = new List <Guid>(); foreach (dynamic id in ea.Message.body.objectIds) { Guid nodeId = Guid.Empty; if (Guid.TryParse((string)id, out nodeId)) { ids.Add(nodeId); } } Sender.Instance.SendMail(ids); //var nodes = NodeManager.Instance.GetByIds(ids); //var priority = PollTask.PRIORITY_USER; //var darg = ea.Message.body.arg as IDictionary<string, object>; //if (darg.ContainsKey("auto") && ea.Message.body.arg.auto == true) // priority = PollTask.PRIORITY_AUTO; //PollTaskManager.Instance.CreateTasks(ea.Message.body.what, nodes, ea.Message.body.arg, priority); } else if (ea.Message.head.what.StartsWith("maquette")) { logger.Debug(string.Format("получена задача {0}", ea.Message.head.what));//для {1} объектов, ea.Message.body.objectIds.Count)); //var ids = new List<Guid>(); //foreach (dynamic id in ea.Message.body.objectIds) //{ // Guid nodeId = Guid.Empty; // if (Guid.TryParse((string)id, out nodeId)) // { // ids.Add(nodeId); // } //} Sender.Instance.SendMaquette(); //var nodes = NodeManager.Instance.GetByIds(ids); //var priority = PollTask.PRIORITY_USER; //var darg = ea.Message.body.arg as IDictionary<string, object>; //if (darg.ContainsKey("auto") && ea.Message.body.arg.auto == true) // priority = PollTask.PRIORITY_AUTO; //PollTaskManager.Instance.CreateTasks(ea.Message.body.what, nodes, ea.Message.body.arg, priority); } else { Guid sessionId = Guid.Parse(ea.Message.body.sessionId); logger.Debug("уведомление для сессии {0} сообщений {1}", sessionId, ea.Message.body.messages.Count()); } } catch (Exception ex) { logger.Error(ex, "уведомление сломало"); } //}); }; uc.RegisterInstance(bus); //настройка ограничений по потокам int workerThreads = 0; int completionPortThreads = 0; ThreadPool.GetMinThreads(out workerThreads, out completionPortThreads); ThreadPool.SetMinThreads(MIN_THREAD_COUNT, completionPortThreads); //старт кэша полноты данных try { FulnessCache.Instance.Start(); } catch (Exception e) { } HandlerManager.Instance.Register(new AuthHandler()); //HandlerManager.Instance.Register(new ObjectsHandler()); HandlerManager.Instance.Register(new SignalHandler()); HandlerManager.Instance.Register(new PollHandler()); HandlerManager.Instance.Register(new HelperHandler()); HandlerManager.Instance.Register(new FolderHandler()); HandlerManager.Instance.Register(new DriverHandler()); HandlerManager.Instance.Register(new MaquetteHandler()); HandlerManager.Instance.Register(new MailerHandler()); HandlerManager.Instance.Register(new TaskHandler()); HandlerManager.Instance.Register(new SetpointHandler()); HandlerManager.Instance.Register(new CacheHandler()); var rh = new RecordsHandler(); HandlerManager.Instance.Register(rh); //фоновый пост-обработчик записей //rh.AddHandler(new LogRecordsHandler()); //rh.AddHandler(new ParametersHandler()); //rh.AddHandler(new LastRecordCacheHandler()); HandlerManager.Instance.Register(new LogHandler(bus)); HandlerManager.Instance.Register(new ModemsHandler()); ReportHandler.Init(bus); HandlerManager.Instance.Register(ReportHandler.Instance); //HandlerManager.Instance.Register(new ReportHandler()); HandlerManager.Instance.Register(new UsersHandler()); HandlerManager.Instance.Register(new RowsHandler()); HandlerManager.Instance.Register(new ManagmentHandler()); HandlerManager.Instance.Register(new NodesHandler()); HandlerManager.Instance.Register(new ParameterHandler()); HandlerManager.Instance.Register(new ExportHandler()); HandlerManager.Instance.Register(new EditHandler()); HandlerManager.Instance.Register(new BusHandler(bus)); //RecordsBackgroundProccessor.Instance.ReSet(); //Sender.Instance.Load(); //2. запуск веб-сервера var binding = ConfigurationManager.AppSettings["binding"]; var root = ConfigurationManager.AppSettings["root-folder"]; host = WebApp.Start(url: binding, startup: b => { Newtonsoft.Json.JsonConvert.DefaultSettings = () => new JsonSerializerSettings() { DateTimeZoneHandling = DateTimeZoneHandling.Utc }; var fso = new FileServerOptions { EnableDirectoryBrowsing = true, FileSystem = new PhysicalFileSystem(root) }; fso.StaticFileOptions.ServeUnknownFileTypes = true; b.UseFileServer(fso); var config = new HttpConfiguration(); config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new { id = RouteParameter.Optional } ); var appXmlType = config.Formatters.XmlFormatter.SupportedMediaTypes.FirstOrDefault(t => t.MediaType == "application/xml"); config.Formatters.XmlFormatter.SupportedMediaTypes.Remove(appXmlType); b.UseWebApi(config); b.MapSignalR <SignalRConnection>("/messageacceptor", new HubConfiguration()); }); logger.Info("сервер запущен (привязка {0}, корневая папка {1})", binding, root); var cmd = ""; while ((cmd = Console.ReadLine()) != "exit") { switch (cmd) { case "dump": break; } logger.Info("для выхода введите exit"); } CacheRepository.Instance.Dispose(); bus.Stop(); }
public TableCreator(ReportHandler reportHandler) : base(reportHandler) { }
public ReportByResponsibleController(ReportHandler handler) { _handler = handler; }
public ClientHandler() { ReportHdlr = new ReportHandler(); }
public ReportEntry(int id, String title, String description, Control reportParameters, ReportHandler defaultsHandler, RunReportHandler runHandler) { ID = id; Title = title; Description = description; ReportParameters = reportParameters; DefaultsHandler = defaultsHandler; RunHandler = runHandler; }
public override void Execute() { WriteLiteral("\r\n"); #line 5 "..\..\Views\Report\Detail.cshtml" ViewBag.Title = "Detail"; int BatchNo = ViewBag.BatchNo; int needSum = 0; int doneSum = 0; string Variant1, Variant2, Variant3, Varaiant4; string need; string done; string dynamicRowStyle = ""; #line default #line hidden WriteLiteral("\r\n\r\n<h4>Batch Detail</h4>\r\n\r\n<p>\r\n <a"); WriteLiteral(" class=\"btn-primary btn-xs\""); WriteAttribute("href", Tuple.Create(" href=\"", 451), Tuple.Create("\"", 487) , Tuple.Create(Tuple.Create("", 458), Tuple.Create("/Report/GetPrevBatch/", 458), true) #line 19 "..\..\Views\Report\Detail.cshtml" , Tuple.Create(Tuple.Create("", 479), Tuple.Create <System.Object, System.Int32>(BatchNo #line default #line hidden , 479), false) ); WriteLiteral(">Previouse batch</a> Batch number: "); #line 19 "..\..\Views\Report\Detail.cshtml" Write(BatchNo); #line default #line hidden WriteLiteral(" <a"); WriteLiteral(" class=\"btn-primary btn-xs\""); WriteAttribute("href", Tuple.Create(" href=\"", 561), Tuple.Create("\"", 597) , Tuple.Create(Tuple.Create("", 568), Tuple.Create("/Report/GetNextBatch/", 568), true) #line 19 "..\..\Views\Report\Detail.cshtml" , Tuple.Create(Tuple.Create("", 589), Tuple.Create <System.Object, System.Int32>(BatchNo #line default #line hidden , 589), false) ); WriteLiteral(">Next batch</a>\r\n <br>\r\n <p>\r\n <h4>Batch info</h4>\r\n <div"); WriteLiteral(" class=\"col-md-3\""); WriteLiteral(">Destination:</div> "); #line 23 "..\..\Views\Report\Detail.cshtml" Write(ViewBag.Destination); #line default #line hidden WriteLiteral("<br>\r\n <div"); WriteLiteral(" class=\"col-md-3\""); WriteLiteral(">Batch number:</div> "); #line 24 "..\..\Views\Report\Detail.cshtml" Write(ViewBag.BatchNo); #line default #line hidden WriteLiteral("<br>\r\n <div"); WriteLiteral(" class=\"col-md-3\""); WriteLiteral(">Number of interuts:</div> "); #line 25 "..\..\Views\Report\Detail.cshtml" Write(ViewBag.InteruptedCounts); #line default #line hidden WriteLiteral("<br>\r\n <div"); WriteLiteral(" class=\"col-md-3\""); WriteLiteral(">Number of skips:</div> "); #line 26 "..\..\Views\Report\Detail.cshtml" Write(ViewBag.NumberOfStepsSkipped); #line default #line hidden WriteLiteral("<br>\r\n <div"); WriteLiteral(" class=\"col-md-3\""); WriteLiteral(">Started:</div> "); #line 27 "..\..\Views\Report\Detail.cshtml" Write(Model.Min(p => p.TimeStart.ToShortDateString())); #line default #line hidden WriteLiteral("<br />\r\n <div"); WriteLiteral(" class=\"col-md-3\""); WriteLiteral(">Ended:</div> "); #line 28 "..\..\Views\Report\Detail.cshtml" Write(Model.Max(p => p.TimeStart.ToShortDateString())); #line default #line hidden WriteLiteral("<br />\r\n </p>\r\n</p>\r\n<div"); WriteLiteral(" class=\"table-responsive\""); WriteLiteral(">\r\n<table"); WriteLiteral(" class=\"table table-responsive table-condensed\""); WriteLiteral(@"> <tr> <th> Operation </th> <th> Start time </th> <th> End </th> <th> Need </th> <th> Actual </th> <th> Info </th> </tr> "); #line 54 "..\..\Views\Report\Detail.cshtml" foreach (var item in Model) { #line default #line hidden #line 55 "..\..\Views\Report\Detail.cshtml" dynamicRowStyle = ""; #line default #line hidden #line 55 "..\..\Views\Report\Detail.cshtml" #line default #line hidden #line 56 "..\..\Views\Report\Detail.cshtml" if ((int)item.RecordType > 9 && (int)item.RecordType < 15) { #line default #line hidden #line 58 "..\..\Views\Report\Detail.cshtml" if (item.RecordType == Operations.StatusInfo || item.RecordType == Operations.Continue || item.RecordType == Operations.Interrupt) { dynamicRowStyle = "<tr>"; #line default #line hidden #line 61 "..\..\Views\Report\Detail.cshtml" if (item.RecordType == Operations.Continue || item.RecordType == Operations.Interrupt) { dynamicRowStyle = "<tr style=\"background-color: beige\">"; } #line default #line hidden #line 64 "..\..\Views\Report\Detail.cshtml" #line default #line hidden #line 65 "..\..\Views\Report\Detail.cshtml" Write(Html.Raw(dynamicRowStyle)); #line default #line hidden #line 65 "..\..\Views\Report\Detail.cshtml" } else { dynamicRowStyle = "<tr style=\"background-color: darkseagreen\"><i>"; #line default #line hidden #line 69 "..\..\Views\Report\Detail.cshtml" Write(Html.DisplayFor(modelItem => item.RecordType)); #line default #line hidden #line 69 "..\..\Views\Report\Detail.cshtml" #line default #line hidden #line 70 "..\..\Views\Report\Detail.cshtml" Write(Html.Raw(dynamicRowStyle)); #line default #line hidden #line 70 "..\..\Views\Report\Detail.cshtml" } #line default #line hidden #line 71 "..\..\Views\Report\Detail.cshtml" } else { #line default #line hidden #line 74 "..\..\Views\Report\Detail.cshtml" Write(Html.Raw("<tr>")); #line default #line hidden #line 74 "..\..\Views\Report\Detail.cshtml" ; } #line default #line hidden #line 75 "..\..\Views\Report\Detail.cshtml" #line default #line hidden WriteLiteral(" <td>\r\n"); #line 77 "..\..\Views\Report\Detail.cshtml" #line default #line hidden #line 77 "..\..\Views\Report\Detail.cshtml" if ((int)item.RecordType > 9 && (int)item.RecordType < 15) { #line default #line hidden #line 79 "..\..\Views\Report\Detail.cshtml" Write(Html.Raw("\t")); #line default #line hidden #line 79 "..\..\Views\Report\Detail.cshtml" ; } #line default #line hidden WriteLiteral(" "); #line 81 "..\..\Views\Report\Detail.cshtml" Write(Html.DisplayFor(modelItem => item.RecordType)); #line default #line hidden WriteLiteral("\r\n </td>\r\n"); WriteLiteral(" <td>\r\n"); #line 84 "..\..\Views\Report\Detail.cshtml" #line default #line hidden #line 84 "..\..\Views\Report\Detail.cshtml" string timeStartForView = item.TimeStart.ToShortTimeString(); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 85 "..\..\Views\Report\Detail.cshtml" Write(timeStartForView); #line default #line hidden WriteLiteral("\r\n </td>\r\n"); WriteLiteral(" <td>\r\n"); #line 88 "..\..\Views\Report\Detail.cshtml" #line default #line hidden #line 88 "..\..\Views\Report\Detail.cshtml" string timeEndForView = item.TimeEnd.ToShortTimeString(); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 89 "..\..\Views\Report\Detail.cshtml" Write(timeEndForView); #line default #line hidden WriteLiteral("\r\n </td>\r\n"); WriteLiteral(" <td>\r\n"); #line 92 "..\..\Views\Report\Detail.cshtml" #line default #line hidden #line 92 "..\..\Views\Report\Detail.cshtml" if ((int)item.RecordType > 31 && (int)item.RecordType < 39) { TimeSpan spanN = new TimeSpan((item.Need * 10000000)); need = (int)spanN.TotalHours + " h " + (int)spanN.Minutes + " m " + (int)spanN.Seconds + " s"; } else { if ((int)item.RecordType > 21 && (int)item.RecordType < 30) { needSum += item.Need; } need = (item.Need / 1000) + "kg"; } #line default #line hidden WriteLiteral(" "); #line 102 "..\..\Views\Report\Detail.cshtml" if (item.Need != 0) { #line default #line hidden #line 104 "..\..\Views\Report\Detail.cshtml" Write(need); #line default #line hidden #line 104 "..\..\Views\Report\Detail.cshtml" } #line default #line hidden WriteLiteral(" </td>\r\n"); WriteLiteral(" <td>\r\n"); #line 108 "..\..\Views\Report\Detail.cshtml" #line default #line hidden #line 108 "..\..\Views\Report\Detail.cshtml" if ((int)item.RecordType > 31 && (int)item.RecordType < 39) { TimeSpan spanD = new TimeSpan((item.Actual * 10000000)); done = (int)spanD.TotalHours + " h " + (int)spanD.Minutes + " m " + (int)spanD.Seconds + " s"; } else { if ((int)item.RecordType > 21 && (int)item.RecordType < 30) { doneSum += item.Actual; } done = (item.Need / 1000) + "kg"; } #line default #line hidden WriteLiteral(" "); #line 121 "..\..\Views\Report\Detail.cshtml" if (item.Actual != 0) { #line default #line hidden WriteLiteral(" <b>"); #line 123 "..\..\Views\Report\Detail.cshtml" Write(done); #line default #line hidden WriteLiteral("</b>\r\n"); #line 124 "..\..\Views\Report\Detail.cshtml" } #line default #line hidden WriteLiteral(" </td>\r\n"); #line 126 "..\..\Views\Report\Detail.cshtml" #line default #line hidden WriteLiteral(" <td>\r\n"); #line 128 "..\..\Views\Report\Detail.cshtml" #line default #line hidden #line 128 "..\..\Views\Report\Detail.cshtml" string info = ReportHandler.getInfoColumn(item); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 129 "..\..\Views\Report\Detail.cshtml" Write(info); #line default #line hidden WriteLiteral("\r\n </td>\r\n"); #line 131 "..\..\Views\Report\Detail.cshtml" #line default #line hidden #line 132 "..\..\Views\Report\Detail.cshtml" if (item.RecordType == Operations.RecipeStart || item.RecordType == Operations.RecipeEnd) { dynamicRowStyle = "</i></tr>"; } else { dynamicRowStyle = "</tr>"; } #line default #line hidden #line 138 "..\..\Views\Report\Detail.cshtml" #line default #line hidden #line 139 "..\..\Views\Report\Detail.cshtml" Write(Html.Raw(dynamicRowStyle)); #line default #line hidden #line 139 "..\..\Views\Report\Detail.cshtml" } #line default #line hidden WriteLiteral("</table>\r\n</div>\r\n<p>\r\n <h4>Batch summary</h4>\r\n <div"); WriteLiteral(" class=\"col-md-3\""); WriteLiteral(">RCP duration:</div> "); #line 145 "..\..\Views\Report\Detail.cshtml" var startTime = Model.Min(p => p.TimeStart.Ticks); var endTime = Model.Max(p => p.TimeEnd.Ticks); var diff = endTime - startTime; TimeSpan duration = TimeSpan.FromTicks(diff); int durationDays = (int)duration.Days; int durationHours = (int)duration.Hours; int durationMinutes = (int)duration.Minutes; #line default #line hidden WriteLiteral("\r\n <b>"); #line 154 "..\..\Views\Report\Detail.cshtml" Write(durationDays); #line default #line hidden WriteLiteral(" d "); #line 154 "..\..\Views\Report\Detail.cshtml" Write(durationHours); #line default #line hidden WriteLiteral(" h "); #line 154 "..\..\Views\Report\Detail.cshtml" Write(durationMinutes); #line default #line hidden WriteLiteral(" m</b><br />\r\n <div"); WriteLiteral(" class=\"col-md-3\""); WriteLiteral(">Total amount dosed: </div>"); #line 155 "..\..\Views\Report\Detail.cshtml" Write(doneSum / 1000); #line default #line hidden WriteLiteral(" kg\r\n</p>\r\n<p>\r\n <a"); WriteLiteral(" class=\"btn-primary btn-sm\""); WriteLiteral(" href=\"/Report/\""); WriteLiteral(">Back to calendar</a>\r\n</p>"); }
/// <summary> /// 打印处理 /// </summary> /// <param name="autoQuotationNoStr">报价单号</param> /// <param name="handleTypeInt">打印处理类型:1 预览 2 打印 3 设计</param> public void PrintHandle(string autoQuotationNoStr, int handleTypeInt) { DataSet ds = new DataSet(); DataTable headTable = BaseSQL.GetTableBySql(string.Format("select * from V_Prn_SA_QuotationBaseInfo where AutoQuotationNo = '{0}' order by AutoId", autoQuotationNoStr)); headTable.TableName = "QuotationBaseInfo"; for (int i = 0; i < headTable.Columns.Count; i++) { #region 设定主表显示的标题 switch (headTable.Columns[i].ColumnName) { case "AutoQuotationNo": headTable.Columns[i].Caption = "报价单号"; break; case "RFQNO": headTable.Columns[i].Caption = "手工单号"; break; case "RecordDate": headTable.Columns[i].Caption = "登记日期"; break; case "Requester": headTable.Columns[i].Caption = "客户需求人"; break; case "Remark": headTable.Columns[i].Caption = "备注"; break; case "BussinessBaseNo": headTable.Columns[i].Caption = "客户编号"; break; case "BussinessBaseText": headTable.Columns[i].Caption = "客户名称"; break; case "BussAddress": headTable.Columns[i].Caption = "客户公司地址"; break; case "BussPhoneNo": headTable.Columns[i].Caption = "客户电话"; break; case "BussFaxNo": headTable.Columns[i].Caption = "客户传真"; break; case "BussContact": headTable.Columns[i].Caption = "客户联系人"; break; case "ProjectName": headTable.Columns[i].Caption = "项目名称"; break; case "ParentAutoQuotationNo": headTable.Columns[i].Caption = "父级报价单号"; break; case "ParentAutoSalesOrderNo": headTable.Columns[i].Caption = "父级销售订单号"; break; case "ParentProjectNo": headTable.Columns[i].Caption = "父级项目号"; break; case "Prepared": headTable.Columns[i].Caption = "制单人"; break; case "PreparedIp": headTable.Columns[i].Caption = "制单人IP"; break; case "Modifier": headTable.Columns[i].Caption = "修改人"; break; case "ModifierIp": headTable.Columns[i].Caption = "修改人IP"; break; case "ModifierTime": headTable.Columns[i].Caption = "修改时间"; break; } #endregion } ds.Tables.Add(headTable); DataTable listTable = BaseSQL.GetTableBySql(string.Format("select *, ROW_NUMBER() over (order by AutoId) as RowNum from V_Prn_SA_QuotationPriceInfo where AutoQuotationNo = '{0}' order by AutoId", autoQuotationNoStr)); listTable.TableName = "QuotationPriceInfo"; for (int i = 0; i < listTable.Columns.Count; i++) { #region 设定子表显示的标题 switch (listTable.Columns[i].ColumnName) { case "RowNum": listTable.Columns[i].Caption = "行号"; break; case "AutoQuotationNo": listTable.Columns[i].Caption = "报价单号"; break; case "Amount": listTable.Columns[i].Caption = "金额"; break; case "Tax": listTable.Columns[i].Caption = "税率"; break; case "TaxAmount": listTable.Columns[i].Caption = "税额"; break; case "SumAmount": listTable.Columns[i].Caption = "价税合计"; break; case "Offerer": listTable.Columns[i].Caption = "报价人"; break; case "QuotationDate": listTable.Columns[i].Caption = "报价日期"; break; case "Versions": listTable.Columns[i].Caption = "版本"; break; case "Remark": listTable.Columns[i].Caption = "备注"; break; case "QuotationState": listTable.Columns[i].Caption = "单据状态"; break; case "StateDesc": listTable.Columns[i].Caption = "单据状态描述"; break; case "CurrencyCateAutoId": listTable.Columns[i].Caption = "币种ID"; break; case "CurrencyCateAbb": listTable.Columns[i].Caption = "币种缩写"; break; case "CurrencyCateName": listTable.Columns[i].Caption = "币种名称"; break; case "ExchangeRate": listTable.Columns[i].Caption = "汇率"; break; } #endregion } ds.Tables.Add(listTable); ReportHandler rptHandler = new ReportHandler(); List <DevExpress.XtraReports.Parameters.Parameter> paralist = rptHandler.GetSystemInfo_ParamList(); rptHandler.XtraReport_Handle("SA_QuotationBaseInfo", ds, paralist, handleTypeInt); }
protected ProgressReporter(ReportHandler reportHandler) { this._reportHandler = reportHandler; }
public ProgressReporter(string taskName, ReportHandler reportHandler) { this._taskName = taskName; this._reportHandler = reportHandler; }
// GET: ReportCalender public ActionResult Index() { int monthAdded = 1; int yearAdded = 1; const int startDay = 1; tankNames = new Dictionary <int, string>(); string DB = string.Empty; string table = string.Empty; int cfNum = 1; foreach (string key in Session.Keys) { if (key.Contains("dbName" + Request.QueryString["name"] + Request.QueryString["plc"])) { DB = Session[key].ToString(); } if (key.Contains("tableName" + Request.QueryString["name"] + Request.QueryString["plc"])) { table = Session[key].ToString(); } if (key.Contains("congirationNumber" + Request.QueryString["name"] + Request.QueryString["plc"])) { cfNum = int.Parse(Session[key].ToString()); } } Session["ReportDB"] = DB; Session["ReportTable"] = table; Session["ReportConfigrationNumber"] = cfNum; int month = DateTime.Now.Month; int year = DateTime.Now.Year; if (month == 12) { monthAdded = 1; yearAdded = year + 1; } else { monthAdded = month + 1; yearAdded = year; } DateTime thisMonthStart = new DateTime(year, month, startDay, 0, 0, 0); DateTime thisMontEnd = new DateTime(yearAdded, monthAdded, startDay, 0, 0, 0); ReportHandler RH = new ReportHandler(); if (cfNum != 0) { tankNames = RH.getTanknames(cfNum); } else { tankNames = RH.getTanknames(); } ReportDBHelper db = new ReportDBHelper(Session["ReportDB"].ToString(), 2); DataReportModel model = db.SelectHeaderData(thisMonthStart, thisMontEnd, Session["ReportTable"].ToString()); foreach (var report in model.Data) { int dest = int.Parse(report.Destination); if (tankNames.Keys.Contains(dest)) { report.Destination = tankNames[dest]; } else { Session["tempforview"] = "Check configuration of report config"; } } ViewBag.month = month; ViewBag.year = year; return(View("calender", model)); }
// ========================================================== initialization // Use this for initialization void Start() { _startNewConversation = this.GetComponent <StartNewConversation>(); if (_shelter == null) { _shelter = g.GetComponent <Shelter> (); } if (_visitors == null) { _visitors = g.GetComponent <Visitor> (); } if (_gametime == null) { _gametime = g.GetComponent <GameTime> (); } if (_reports == null) { _reports = g.GetComponent <ReportHandler> (); } _gameWorld = g.GetComponent <GameWorld> (); _Cond = g.GetComponent <Conditions>(); _newdayanim = g.GetComponent <NewDayAnim> (); foreach (Transform child in g.transform) { if (child.name == "BlackBox") { blackbox = child; } if (child.name == "Title") { title = child; } } charButtons = sideButtons = showButtons = showJournal = showHelp = false; showAllButtons = false; tutorial = true; warning = 0; index = -1; animateSide = 500; fade = 0; fading = 0; credits = false; boxStyle = new GUIStyle("box"); buttonStyle = new GUIStyle("button"); labelStyle = new GUIStyle("Label"); regular = (Font)Resources.Load("Arial", typeof(Font)); bold = (Font)Resources.Load("Arial Bold", typeof(Font)); box = (Texture2D)Resources.Load("boxBack", typeof(Texture2D)); button1 = (Texture2D)Resources.Load("buttonBack", typeof(Texture2D)); button2 = (Texture2D)Resources.Load("buttonBack2", typeof(Texture2D)); button3 = (Texture2D)Resources.Load("buttonBack3", typeof(Texture2D)); black = (Texture2D)Resources.Load("black", typeof(Texture2D)); }
public ReportManager(ReportHandler reportHandler, ServiceContext serviceContext, ILogger nLogger) { this.reportHandler = reportHandler; this.serviceContext = serviceContext; this.nLogger = nLogger; }
public TestDataChecker(ReportHandler reportHandler) : base(reportHandler) { this._productionPlanNos = new Dictionary <string, string>(); this._operationPlanNos = new Dictionary <string, string>(); }
public static void SetReportHandler(ReportHandler reportHandler) => _reportHandler = reportHandler;
public TestDataSheetCreator(ReportHandler reportHandler) : base(reportHandler) { }
/// <summary> /// 打印处理 /// </summary> /// <param name="wrHeadNoStr">出库单号</param> /// <param name="handleTypeInt">打印处理类型:1 预览 2 打印 3 设计</param> public void PrintHandle(string wrHeadNoStr, int handleTypeInt) { DataSet ds = new DataSet(); DataTable headTable = BaseSQL.GetTableBySql(string.Format("select * from V_Prn_INV_WarehouseReceiptHead where WarehouseReceipt = '{0}' order by AutoId", wrHeadNoStr)); headTable.TableName = "WarehouseReceiptHead"; for (int i = 0; i < headTable.Columns.Count; i++) { #region 设定主表显示的标题 switch (headTable.Columns[i].ColumnName) { case "WarehouseReceipt": headTable.Columns[i].Caption = "出库单号"; break; case "WarehouseReceiptDate": headTable.Columns[i].Caption = "出库日期"; break; case "DepartmentNo": headTable.Columns[i].Caption = "部门编号"; break; case "DepartmentName": headTable.Columns[i].Caption = "部门名称"; break; case "RepertoryNo": headTable.Columns[i].Caption = "出库仓库编号"; break; case "RepertoryName": headTable.Columns[i].Caption = "出库仓库名称"; break; case "WarehouseReceiptTypeNo": headTable.Columns[i].Caption = "出库类别编号"; break; case "WarehouseReceiptTypeName": headTable.Columns[i].Caption = "出库类别名称"; break; case "ApprovalTypeNo": headTable.Columns[i].Caption = "审批类型编码"; break; case "ApprovalTypeNoText": headTable.Columns[i].Caption = "审批类型名称"; break; case "Prepared": headTable.Columns[i].Caption = "制单人"; break; case "PreparedIp": headTable.Columns[i].Caption = "制单人IP"; break; case "Remark": headTable.Columns[i].Caption = "备注"; break; case "Modifier": headTable.Columns[i].Caption = "修改人"; break; case "ModifierIp": headTable.Columns[i].Caption = "修改人IP"; break; case "ModifierTime": headTable.Columns[i].Caption = "修改时间"; break; case "WarehouseState": headTable.Columns[i].Caption = "单据状态"; break; case "WarehouseStateDesc": headTable.Columns[i].Caption = "单据状态描述"; break; case "ManufactureNo": headTable.Columns[i].Caption = "工程编码"; break; case "ManufactureName": headTable.Columns[i].Caption = "工程名称"; break; } #endregion } ds.Tables.Add(headTable); DataTable listTable = BaseSQL.GetTableBySql(string.Format("select *, ROW_NUMBER() over (order by AutoId) as RowNum from V_Prn_INV_WarehouseReceiptList where WarehouseReceipt = '{0}' order by AutoId", wrHeadNoStr)); listTable.TableName = "WarehouseReceiptList"; for (int i = 0; i < listTable.Columns.Count; i++) { #region 设定子表显示的标题 switch (listTable.Columns[i].ColumnName) { case "RowNum": listTable.Columns[i].Caption = "行号"; break; case "WarehouseReceipt": listTable.Columns[i].Caption = "出库单号"; break; case "CodeNo": listTable.Columns[i].Caption = "物料编号"; break; case "CodeFileName": listTable.Columns[i].Caption = "零件编号"; break; case "CodeName": listTable.Columns[i].Caption = "零件名称"; break; case "CatgName": listTable.Columns[i].Caption = "分类名称"; break; case "CatgDescription": listTable.Columns[i].Caption = "分类说明"; break; case "CodeSpec": listTable.Columns[i].Caption = "规格型号"; break; case "CodeWeight": listTable.Columns[i].Caption = "重量"; break; case "MaterialVersion": listTable.Columns[i].Caption = "物料版本"; break; case "LibName": listTable.Columns[i].Caption = "Level 1"; break; case "MaterialCategory": listTable.Columns[i].Caption = "Level 2"; break; case "MaterialName": listTable.Columns[i].Caption = "Level 3"; break; case "Brand": listTable.Columns[i].Caption = "品牌"; break; case "FinishCatg": listTable.Columns[i].Caption = "表面处理"; break; case "LevelCatg": listTable.Columns[i].Caption = "加工等级"; break; case "Unit": listTable.Columns[i].Caption = "单位"; break; case "Qty": listTable.Columns[i].Caption = "出库数量"; break; case "ProjectNo": listTable.Columns[i].Caption = "项目号"; break; case "ProjectName": listTable.Columns[i].Caption = "项目名称"; break; case "StnNo": listTable.Columns[i].Caption = "站号"; break; case "Remark": listTable.Columns[i].Caption = "备注"; break; case "ShelfId": listTable.Columns[i].Caption = "货架ID"; break; case "ShelfNo": listTable.Columns[i].Caption = "货架号"; break; case "ShelfLocation": listTable.Columns[i].Caption = "货架位置"; break; } #endregion } ds.Tables.Add(listTable); ReportHandler rptHandler = new ReportHandler(); List <DevExpress.XtraReports.Parameters.Parameter> paralist = rptHandler.GetSystemInfo_ParamList(); rptHandler.XtraReport_Handle("INV_WarehouseReceiptHead", ds, paralist, handleTypeInt); }
/// <summary> /// <see cref="ProgressReporter"/> constructor. /// </summary> /// <param name="reportHandler">The <see cref="ReportHandler"/> that will handle the <see cref="ProgressReport"/>s.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="reportHandler"/> is null.</exception> public ProgressReporter(ReportHandler reportHandler) { this.reportHandler = reportHandler ?? throw new ArgumentNullException(nameof(reportHandler)); }