コード例 #1
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public WbsElementPnBudget(WbsElement wbsElement, PnBudgetFundType pnBudgetFundType, FundingSource fundingSource, string fundsCenter, int fiscalMonthPeriod, FiscalQuarter fiscalQuarter, int fiscalYear, int calendarMonthNumber, int calendarYear, string fIDocNumber) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.WbsElementPnBudgetID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.WbsElementID         = wbsElement.WbsElementID;
     this.WbsElement           = wbsElement;
     wbsElement.WbsElementPnBudgets.Add(this);
     this.PnBudgetFundTypeID = pnBudgetFundType.PnBudgetFundTypeID;
     this.PnBudgetFundType   = pnBudgetFundType;
     pnBudgetFundType.WbsElementPnBudgets.Add(this);
     this.FundingSourceID = fundingSource.FundingSourceID;
     this.FundingSource   = fundingSource;
     fundingSource.WbsElementPnBudgets.Add(this);
     this.FundsCenter       = fundsCenter;
     this.FiscalMonthPeriod = fiscalMonthPeriod;
     this.FiscalQuarterID   = fiscalQuarter.FiscalQuarterID;
     this.FiscalQuarter     = fiscalQuarter;
     fiscalQuarter.WbsElementPnBudgets.Add(this);
     this.FiscalYear          = fiscalYear;
     this.CalendarMonthNumber = calendarMonthNumber;
     this.CalendarYear        = calendarYear;
     this.FIDocNumber         = fIDocNumber;
 }
コード例 #2
0
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static WbsElementPnBudget CreateNewBlank(WbsElement wbsElement, PnBudgetFundType pnBudgetFundType, FundingSource fundingSource, FiscalQuarter fiscalQuarter)
 {
     return(new WbsElementPnBudget(wbsElement, pnBudgetFundType, fundingSource, default(string), default(int), fiscalQuarter, default(int), default(int), default(int), default(string)));
 }
コード例 #3
0
 public static void DeletePnBudgetFundType(this IQueryable <PnBudgetFundType> pnBudgetFundTypes, PnBudgetFundType pnBudgetFundTypeToDelete)
 {
     DeletePnBudgetFundType(pnBudgetFundTypes, new List <PnBudgetFundType> {
         pnBudgetFundTypeToDelete
     });
 }