private void btnOk_Click(object sender, EventArgs e) { if (optPrinter.Checked) { SendToPrinter(); this.Close(); //if (Store.ActiveReport == "Sales") //{ // salesRepository.UpdatePrintCounter(txtCode.Text); //} //else if (Store.ActiveReport == "Purchase") //{ // purchaseRepository.UpdatePrintCounter(txtCode.Text); //} //else if (Store.ActiveReport == "BillReceipt") //{ // billReceiptRepository.UpdatePrintCounter(txtCode.Text); //} //else if (Store.ActiveReport == "Expense") //{ // expenseRepository.UpdatePrintCounter(txtCode.Text); //} //else if (Store.ActiveReport == "StockCorrection") //{ // stockCorrectionRepository.UpdatePrintCounter(txtCode.Text); //} } else { var frmReport = new ReportUI(this); frmReport.Show(); } }
protected override void Awake() { Log.debug("Create Button"); toggleButton = ReportButton.Create(); toggleButton.eventClick += OnButtonToggled; Log.debug("Create UI..."); ui = ReportUI.Create(); ui.enabled = false; ui.absolutePosition = new Vector2(-1000, 0); ui.eventHighlightType += (String s) => { SetHighlight(s); }; Log.debug("Create Analyzer..."); analyzer = new TrafficAnalyzer(); analyzer.OnReport += OnGotReport; Log.debug("Create Path Controller..."); paths = new PathController(this); Log.info("Load Cursor..."); m_cursor = CursorInfo.CreateInstance <CursorInfo>(); m_cursor.m_texture = ResourceLoader.loadTexture("Materials/Cursor.png"); m_cursor.m_hotspot = new Vector2(0, 0); loadingCursor = CursorInfo.CreateInstance <CursorInfo>(); loadingCursor.m_texture = ResourceLoader.loadTexture("Materials/Hourglass.png"); Log.info("QueryTool awoken"); base.Awake(); }
public JsonResult GetReports(ReportUI model) { var response = reportsData.GetReportData(model); return(new JsonResult { Data = response, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
private void Awake() { if (UI == null) { UI = this; } Choises = new List <VariantButtonUI>(); print("ReportUI"); Hide(); }
private void tsbPurchaseUnPaidSupplier_Click(object sender, EventArgs e) { var userAccess = userAccessRepository.GetAll(); bool isAllowed = userAccess.Exists(u => u.FullName == Store.ActiveUser && u.ObjectName == "Hutang -> Belum Lunas" && u.IsOpen); if (isAllowed || Store.IsAdministrator) { Store.ActiveReport = "PurchaseUnPaidSupplier"; var frm1 = new ReportUI(); frm1.Show(); } else { MessageBox.Show("Anda tidak dapat membuka laporan ini", "Perhatian", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
protected IActionResult ReportJson() { //固定参数 var Params = V("Params"); var fixedParams = ""; if (Params != null) { var fixedIndex = Params.IndexOf("!fixed", StringComparison.Ordinal); fixedParams = fixedIndex > -1 ? Params.Substring(0, fixedIndex) : ""; } //跨域 var jsonData = new ReportUI() { DataSource = V("dataSourceUrl"), AddLink = V("AddLink"), Title = V("Title"), ExtraParam = V("ExtraParam"), ReportId = V("ReportID"), Params = Params, PerCount = V("perCount"), PageIndex = V("pageIndex"), ShowDeafultButton = V("showDeafultButton"), DbConnStringKey = V("dbConnStringKey"), DataSourceUrl = V("dataSourceUrl"), FormControlConfig = Search.Serialize(), DeleteLink = V("deleteLink"), ImportLink = V("importLink"), CurrentUrl = V("Url"), FixedParams = fixedParams, BackUrl = V("backUrl") }; return(Json(State.Success, jsonData, false)); }
private void btnOk_Click(object sender, EventArgs e) { var frmReport = new ReportUI(this); frmReport.Show(); }
public List <dynamic> GetReportData(ReportUI model) { var StartDate = model.DateStart.ToString("yyyy-MM-dd"); var EndDate = model.DateEnd.ToString("yyyy-MM-dd"); List <dynamic> objDynamic = new List <dynamic>(); try { string wherecondition = string.Empty, strCustomerID = string.Empty; String endday = string.Empty; #region comm //switch (Convert.ToInt16(model.Endmonth)) //{ // case 1: // { // endday = "31"; // break; // } // case 2: // { // endday = "28"; // break; // } // case 3: // { // endday = "31"; // break; // } // case 4: // { // endday = "30"; // break; // } // case 5: // { // endday = "31"; // break; // } // case 6: // { // endday = "30"; // break; // } // case 7: // { // endday = "31"; // break; // } // case 8: // { // endday = "31"; // break; // } // case 9: // { // endday = "30"; // break; // } // case 10: // { // endday = "31"; // break; // } // case 11: // { // endday = "30"; // break; // } // case 12: // { // endday = "31"; // break; // } //} #endregion if (!string.IsNullOrEmpty(model.CustomerID)) { wherecondition = "AND ord.CustId = " + model.CustomerID; if (!string.IsNullOrEmpty(model.StatusID)) { wherecondition = wherecondition + "AND ord.StatusId = ' " + model.StatusID + " '"; } wherecondition = wherecondition + " AND ord.CreatedOn between '" + StartDate + "'"; wherecondition = wherecondition + " AND '" + EndDate + "'"; } DataSet ds = GetReports(wherecondition); var myEnumerablecat = ds.Tables[0].AsEnumerable(); List <ReportsDTO> ReportsDTO = (from item in myEnumerablecat select new ReportsDTO { Request = item.Field <int>("Request"), CountryName = item.Field <string>("CountryName"), TotalOrderAmount = (item.Field <decimal>("TotalOrderAmount")).ToString(), }).ToList(); objDynamic.Add(ReportsDTO); var myEnumerablezz = ds.Tables[1].AsEnumerable(); List <ReportsDTOO> ReportsDTOO = (from item in myEnumerablezz select new ReportsDTOO { OrderId = item.Field <Int64>("OrderId"), ReferenceNo = item.Field <string>("ReferenceNo"), Department = item.Field <string>("Department"), CountryName = item.Field <string>("CountryName"), SalesOrderNo = item.Field <string>("SalesOrderNo"), Requesters_Name = item.Field <string>("Requesters_Name"), Requesters_Email = item.Field <string>("Requesters_Email"), BillingCotactEmail = item.Field <string>("BillingCotactEmail"), StatusName = item.Field <string>("StatusName"), CreatedOn = (item.Field <DateTime?>("CreatedOn")).ToString(), LeadTime = (item.Field <int?>("LeadTime")).ToString(), Est_Ship_Date = (item.Field <DateTime?>("Est_Ship_Date")).ToString(), ShipmentDate = (item.Field <DateTime?>("ShipmentDate")).ToString(), FOB = (item.Field <decimal?>("FOB")).ToString(), TaxValue = (item.Field <decimal?>("TaxValue")).ToString(), Feight = (item.Field <decimal?>("Feight")).ToString(), TotalOrderAmount = (item.Field <decimal?>("TotalOrderAmount")).ToString(), Approvedby = item.Field <string>("Approvedby"), AuthorizedOn = (item.Field <DateTime?>("AuthorizedOn")).ToString(), }).ToList(); objDynamic.Add(ReportsDTOO); } catch (Exception ex) { log.logErrorMessage("Reports.SreportsGet"); log.logErrorMessage(ex.StackTrace); } return(objDynamic); }