コード例 #1
0
 partial void ActualCashflowPressed(NSButton sender)
 {
     if (this.validIDEntered)
     {
         clsCashflow cashflow = new clsCashflow(this.CashflowIDTextField.IntValue);
         if (cashflow.Comment() != null)
         {
             this.CommentTextField.StringValue = cashflow.Comment();
         }
         else
         {
             this.CommentTextField.StringValue = "";
         }
         if (cashflow.Actual())
         {
             this.SystemMessageTextField.StringValue = "CASHFLOW IS ALREADY ACTUAL";
         }
         else if (cashflow.MarkActual(System.DateTime.Today))
         {
             this.SystemMessageTextField.StringValue = "CASHFLOW MADE ACTUAL";
             this.ActualTextField.StringValue        = "Actual : " + true.ToString();
             cashflow.Save();
         }
         else
         {
             this.SystemMessageTextField.StringValue = "CASHFLOW EXPIRED, CAN'T MAKE ACTUAL";
         }
     }
     RedrawTable();
 }
コード例 #2
0
        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();
        }