partial void CashflowIDEntered(AppKit.NSTextField sender) { clsCashflow cf = new clsCashflow(this.CashflowIDTextField.IntValue); this.DatePicker.DateValue = (NSDate)cf.PayDate().ToUniversalTime(); this.RecordDateOverridePicker.DateValue = (NSDate)cf.RecordDate().ToUniversalTime(); this.AmountTextField.DoubleValue = cf.Amount(); this.TypePopUpButton.SelectItem(cf.TypeID().ToString()); if (this.TypePopUpButton.TitleOfSelectedItem == null) { this.typeChosen = clsCashflow.Type.Unknown; this.SystemMessageTextField.StringValue = "INVALID CASHFLOW TYPE (" + cf.TypeID().ToString() + ")"; this.validIDEntered = false; } else { this.validIDEntered = true; if (cf.Comment() != null) { this.CommentTextField.StringValue = cf.Comment(); } else { this.CommentTextField.StringValue = ""; } this.RedrawTable(); } this.ActualTextField.StringValue = "Actual : " + cf.Actual().ToString(); this.RedrawTable(); }
private void _TestCashflow() { clsCashflow cf = new clsCashflow(47); Console.WriteLine(cf.TransactionID() + "," + cf.Amount() + "," + cf.PayDate()); clsCSVTable testTable = new clsCSVTable(clsCashflow.strCashflowPath); testTable.SaveAs("/Users/" + Environment.UserName + "/Documents/Professional/Resilience/tblCashflowTest.csv"); DateTime pd = DateTime.Today; DateTime rd = DateTime.Today; DateTime dd = DateTime.MaxValue; int pid = 17; double a = 100000; bool act = false; clsCashflow.Type t = clsCashflow.Type.RehabDraw; clsCashflow cfTest = new clsCashflow(pd, rd, dd, pid, a, act, t); Console.WriteLine(cfTest.Save("/Users/" + Environment.UserName + "/Documents/Professional/Resilience/tblCashflowTest.csv")); }
partial void CashflowIDChosen(NSPopUpButton sender) { clsCashflow cf = new clsCashflow(Int32.Parse(CashflowIDPopUp.SelectedItem.Title)); this.dateChanger.DateValue = (NSDate)(cf.PayDate().AddDays(7).ToUniversalTime()); }