/// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public WbsElementObligationItemBudget(WbsElement wbsElement, ObligationItem obligationItem, CostAuthority costAuthority, FundingSource fundingSource) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.WbsElementObligationItemBudgetID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.WbsElementID = wbsElement.WbsElementID;
     this.WbsElement   = wbsElement;
     wbsElement.WbsElementObligationItemBudgets.Add(this);
     this.ObligationItemID = obligationItem.ObligationItemID;
     this.ObligationItem   = obligationItem;
     obligationItem.WbsElementObligationItemBudgets.Add(this);
     this.CostAuthorityID = costAuthority.CostAuthorityID;
     this.CostAuthority   = costAuthority;
     costAuthority.WbsElementObligationItemBudgets.Add(this);
     this.FundingSourceID = fundingSource.FundingSourceID;
     this.FundingSource   = fundingSource;
     fundingSource.WbsElementObligationItemBudgets.Add(this);
 }
 /// <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;
 }
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static WbsElementObligationItemBudget CreateNewBlank(WbsElement wbsElement, ObligationItem obligationItem, CostAuthority costAuthority, FundingSource fundingSource)
 {
     return(new WbsElementObligationItemBudget(wbsElement, obligationItem, costAuthority, fundingSource));
 }
 /// <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)));
 }
Beispiel #5
0
 public static void DeleteWbsElement(this IQueryable <WbsElement> wbsElements, WbsElement wbsElementToDelete)
 {
     DeleteWbsElement(wbsElements, new List <WbsElement> {
         wbsElementToDelete
     });
 }