// 日付情報から期間を所定のフォーマットで返却する public string EventDateText() { string openText = OpenDate.ToString("yyyy/MM/dd"); string closeText = CloseDate.ToString("yyyy/MM/dd"); return(string.Format("{0}-{1}", openText, closeText)); }
private string CsvClose() { var header = string.Join(",", "StopLoss", "Target", "GridType", "GridGap", "StartEquity", "StartCash", "OpenDate", "OpenPrice", "CloseDate", "ClosePrice", "Equity", "Action", "OpenValue", "CloseValue", "P&L", "P&L%", "DaysRun", "HoDLCloseValue", "HoDLP&L", "HoDLP&L%", "P&L vs HODL", "P&L vs HODL%", "numTrades", "GridProfitTotal", "GridProfitShares", "AvailableCash"); var item = string.Join(",", low, high, IsGeometric ? "G" : "A", gridGap, OpenStocksQuantityForBot, startingCash, OpenDate, OpenPrice, CloseDate, ClosePrice, tradingFile[0].Equity, "Close", OpenValue, CloseValue, CloseValue - OpenValue, decimal.Round(100 * (CloseValue - OpenValue) / OpenValue, 2), (int)CloseDate.Subtract(OpenDate).TotalDays, HoDLCloseValue, HoDLCloseValue - OpenValue, decimal.Round(100 * (HoDLCloseValue - OpenValue) / OpenValue, 2), CloseValue - HoDLCloseValue, decimal.Round(100 * (CloseValue - HoDLCloseValue) / HoDLCloseValue, 2), numTrades, GridProfitTotal, GridProfitShares, availableCash); if (!File.Exists(summaryFileName)) { File.AppendAllText(summaryFileName, header + Environment.NewLine); } File.AppendAllText(summaryFileName, item + Environment.NewLine); return(string.Join(Environment.NewLine, header, item)); }
protected override void ExecuteWorkflowLogic() { var quoteCloseRequest = new CloseQuoteRequest() { Status = QuoteStatus.Get(Context.ExecutionContext), QuoteClose = new Entity("quoteclose") { ["subject"] = Subject.Get(Context.ExecutionContext), ["quoteid"] = Quote.Get(Context.ExecutionContext), ["actualend"] = CloseDate.Get(Context.ExecutionContext), ["description"] = Description.Get(Context.ExecutionContext) } }; Context.UserService.Execute(quoteCloseRequest); }
protected override void ExecuteWorkflowLogic() { var fulfillSalesOrderRequest = new FulfillSalesOrderRequest() { Status = SalesOrderStatus.Get(Context.ExecutionContext), OrderClose = new Entity("orderclose") { ["subject"] = Subject.Get(Context.ExecutionContext), ["salesorderid"] = SalesOrder.Get(Context.ExecutionContext), ["actualend"] = CloseDate.Get(Context.ExecutionContext), ["description"] = Description.Get(Context.ExecutionContext) } }; Context.UserService.Execute(fulfillSalesOrderRequest); }
protected override void ExecuteWorkflowLogic(CodeActivityContext executionContext, IWorkflowContext context, IOrganizationService service) { var incidentCloseRequest = new CloseIncidentRequest() { Status = IncidentStatus.Get(executionContext), IncidentResolution = new Entity("incidentresolution") { ["subject"] = Subject.Get(executionContext), ["incidentid"] = Incident.Get(executionContext), ["actualend"] = CloseDate.Get(executionContext), ["description"] = Description.Get(executionContext) } }; service.Execute(incidentCloseRequest); }
protected override void ExecuteWorkflowLogic() { var convertQuoteToSalesOrderRequest = new ConvertQuoteToSalesOrderRequest() { ColumnSet = new ColumnSet("salesorderid"), QuoteCloseDate = CloseDate.Get(Context.ExecutionContext), QuoteCloseDescription = Description.Get(Context.ExecutionContext), QuoteCloseStatus = QuoteStatus.Get(Context.ExecutionContext), QuoteCloseSubject = Subject.Get(Context.ExecutionContext), QuoteId = Quote.Get(Context.ExecutionContext).Id }; var convertQuoteToSalesOrderResponse = (ConvertQuoteToSalesOrderResponse)Context.UserService.Execute(convertQuoteToSalesOrderRequest); SalesOrder.Set(Context.ExecutionContext, convertQuoteToSalesOrderResponse.Entity.ToEntityReference()); }
protected override void ExecuteWorkflowLogic() { var opportunityClose = new Entity("opportunityclose") { ["subject"] = Subject.Get(Context.ExecutionContext), ["opportunityid"] = Opportunity.Get(Context.ExecutionContext), ["actualrevenue"] = ActualRevenue.Get(Context.ExecutionContext), ["actualend"] = CloseDate.Get(Context.ExecutionContext), ["description"] = Description.Get(Context.ExecutionContext) }; var winOpportunityRequest = new WinOpportunityRequest() { Status = OpportunityStatus.Get(Context.ExecutionContext), OpportunityClose = opportunityClose }; Context.UserService.Execute(winOpportunityRequest); }
private async void CloseDateButton_Click(object sender, RoutedEventArgs e) { var closeDate = new CloseDate(); await DialogHost.Show(closeDate, "RootDialog"); }
// Formats campground details to look nice and neat public override string ToString() { return(CampgroundId.ToString().PadRight(15) + CampgroundName.ToString().PadRight(50) + OpenDate.ToString().PadRight(15) + CloseDate.ToString().PadRight(20) + "$" + DailyFee.ToString()); }