public static void Main(string[] args) { var sourcePath = args[0]; var targetPath = args[1]; var report = new CreateReport(sourcePath); var output = new StringBuilder(); output = report.Report(sourcePath); WriteToFile(output, targetPath); }
protected override void SolveInstance(IGH_DataAccess DA) { List <object> reportParts = new List <object>(); string title = string.Empty; bool tableOfContents = false; DA.GetDataList(0, reportParts); DA.GetData(1, ref title); DA.GetData(2, ref tableOfContents); CreateReport reportObject = new CreateReport(reportParts, title, tableOfContents); MarkdownDocument report = reportObject.Create(); DA.SetData(0, report); }
Task <Report> IReportsEndpoint.CreateAccountReportAsync( DateTimeOffset startDate, DateTimeOffset endDate, string accountId, string productId, ReportFormat format, string email, CancellationToken cancellationToken) { var r = new CreateReport { Type = ReportType.Account, StartDate = startDate, EndDate = endDate, ProductId = productId, AccountId = accountId, Format = format, Email = email, }; return(this.Reports.CreateReportAsync(r, cancellationToken)); }
public ActionResult Report(CreateReport model) { var rep = new Report() { Substantiation = model.Substantiation }; rep.Author = user; rep.Discussion = repo.GetElements().ToList()[model.DisId]; if (repo.Report(rep)) { return(Content("true")); } else { return(Content("false")); } }
private void CreateReport_OnClick(object sender, RoutedEventArgs e) { if (executorsInventory.SelectedIndex >= 0) { Executor ex = (Executor)executorsInventory.SelectedItem; if (ex.Contracts.Count > 0) { CreateReport createReport = new CreateReport(ex); } else { MessageBox.Show("Вибраний виконавець не має жодного дійсного договору", "Помилка", MessageBoxButton.OK, MessageBoxImage.Error); } //this.Hide(); } }
public IApiResult Create(CreateReport operation = null) { var result = operation.ExecuteAsync().Result; if (result is ValidationsOutput) { return(new ApiResult <List <ValidationItem> >() { Data = ((ValidationsOutput)result).Errors }); } else { return(new ApiResult <object>() { Status = ApiResult <object> .ApiStatus.Success }); } }
// make it open screens private void lstFunctions_SelectedIndexChanged(object sender, EventArgs e) { // no need to fill twice. It's a big operation fillLists(); clearText(); switch (lstFunctions.Text) { case ("Create a New Customer"): hideAll(); grpNewCustomer.Location = showLocation; break; case ("Create a New Order"): hideAll(); grpNewOrderCust.Location = showLocation; //grpOrderSelect.Location = showLocation; lost code break; case ("Update an Order"): hideAll(); grpUpdate.Location = showLocation; break; case ("Generate a Picking List"): hideAll(); grpPickingSelect.Location = showLocation; break; case ("Generate an Expiry Report"): hideAll(); fillLists(); createRep = new CreateReport(expiredItems); lblReportNum.Text = createRep.Exp.ReportID; dateBox.Text = DateTime.Now.ToString("dd/MM/yyyy", CultureInfo.InvariantCulture); grpReport.Show(); grpReport.Location = showLocation; break; default: MessageBox.Show("Invalid Entry, please try again"); break; } }
// GET: CreateReport public ActionResult CreateReport() { ViewBag.PageType = "InternalAction"; ViewBag.AmbitoName = GetCookie("AmbitoName"); ViewBag.UserIdentity = GetCookie("UserIdentity"); ViewBag.AmbitoList = GetCookie("AmbitoId") + "|" + GetCookie("NodeId"); CreateReport model = new CreateReport() { Name = "", Description = "" }; model.TemplateItems = new List <ReportTemplate>(); string path = Server.MapPath("~/cert/client.pfx"); var ambito = AmbitiUtility.GetAmbitoById(GetCookie("AmbitoId")); QRSQlikAPI qrsQlikApi = new QRSQlikAPI(AmbitiUtility.GetAmbitoNode(GetCookie("AmbitoId"), GetCookie("NodeId")).Server, path); List <SenseStream> myStreams; string errorMessage = ""; qrsQlikApi.GetStreamsByCustomProperty(GetCookie("UserID"), GetCookie("UserDirectory"), "StreamType", "Template", ambito.customproperty, out myStreams, out errorMessage); if (myStreams != null && myStreams.Count > 0) { QlikAPI qlikApi = new QlikAPI(AmbitiUtility.GetAmbitoNode(GetCookie("AmbitoId"), GetCookie("NodeId")).Link, ambito.superuserid, ambito.superuserdom, path); List <SenseApplication> apps = new List <SenseApplication>(); if (qlikApi.GetPublishedAppsInSelectedStreams(myStreams.Select(s => s.Id).ToList(), out apps)) { if (apps != null && apps.Count > 0) { foreach (var app in apps) { model.TemplateItems.Add(new ReportTemplate() { TemplateStreamID = app.StreamID, TemplateID = app.AppId, TemplateDescription = app.Name }); } } } } return(View(model)); }
public void saveChanges() { if (PlayerPrefs.GetString("password") == oldPassword.text) { PlayerPrefs.SetString("password", newPassword.text); } if (melody.value != PlayerPrefs.GetInt("song")) { PlayerPrefs.SetInt("song", melody.value); InformationHolder.CurrentSong = melody.value; } if (PlayerPrefs.GetInt("speed") != speedOfGame.value) { PlayerPrefs.SetInt("speed", speedOfGame.value); InformationHolder.CurrentSpeed = speedOfGame.value; CreateReport.restartData(); } }
public async Task <IActionResult> Create([FromBody] CreateReport command) { command.UserId = UserId; return(new OkObjectResult(await mediator.Send(command))); }
void btnRisk_Click(object sender, EventArgs e) { if (CheckedRowIndexs.Count == 0) { return; } DataRow dr = gridView1.GetDataRow(CheckedRowIndexs[0]); if (dr != null && dr["isrisk"] != null) { if (dr["isrisk"].ToString() == "已评估") { DXMessageBox.ShowWarning2("已经评估过!"); return; } else if (dr["isrisk"].ToString() == "暂存") { DXMessageBox.ShowWarning2("问卷处于暂存状态,请填写完成问卷!"); return; } } else { return; } DataSet ds = TmoShare.getDataSetFromXML(riskxml, true); if (ds.Tables[0].Rows.Count == 0) { ds.Tables[0].Rows.Add(ds.Tables[0].NewRow()); } ds.Tables[0].Rows[0]["user_id"] = dr["user_id"]; string riskDxml = TmoServiceClient.InvokeServerMethodT <string>(funCode.GetTimes, new object[] { dr["user_id"].ToString() }); DataSet riskState = TmoShare.getDataSetFromXML(riskDxml); if (riskState != null && riskState.Tables.Count > 0 && riskState.Tables[0] != null && riskState.Tables[0].Rows.Count > 0) { if (riskState.Tables[0].Rows[0] != null && riskState.Tables[0].Rows[0]["isrisk"].ToString() == "1") { ds.Tables[0].Rows[0]["user_time"] = riskState.Tables[0].Rows[0]["user_times"]; string selexml = TmoShare.getXMLFromDataSet(ds); string strmlx = TmoServiceClient.InvokeServerMethodT <string>(funCode.GetRiskData, new object[] { selexml }); ds = TmoShare.getDataSetFromXML(strmlx); string c = CreateReport.pphase_Result(ds.Tables[0], ds.Tables[1], "1"); if (c == "1") { DXMessageBox.ShowWarning2("生成评估数据成功"); GetData(); } else if (c == "2") { DXMessageBox.ShowWarning2("生成评估数据失败"); } else { DXMessageBox.ShowSuccess("恭喜您,您的身体非常健康\r\n我们暂时无法给你出报告!"); } } else if (riskState.Tables[0].Rows[0] != null && riskState.Tables[0].Rows[0]["isrisk"].ToString() == "2") { DXMessageBox.ShowWarning2("已经评估过!"); } else { DXMessageBox.ShowWarning2("问卷处于暂存状态,请填写完成问卷!"); } } else { DXMessageBox.ShowWarning2("暂时不能评估"); } }
public async Task <IHttpActionResult> CreateReport([System.Web.Http.FromBody] CreateReport command) { await _commandDispatcher.DispatchAsync(command); return(Ok()); }