/// <summary> /// Deprecated Method for adding a new object to the ProductionOrders EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToProductionOrders(ProductionOrder productionOrder) { base.AddObject("ProductionOrders", productionOrder); }
/// <summary> /// Create a new ProductionOrder object. /// </summary> /// <param name="orderNo">Initial value of the OrderNo property.</param> /// <param name="shipDay">Initial value of the ShipDay property.</param> public static ProductionOrder CreateProductionOrder(global::System.String orderNo, global::System.DateTime shipDay) { ProductionOrder productionOrder = new ProductionOrder(); productionOrder.OrderNo = orderNo; productionOrder.ShipDay = shipDay; return productionOrder; }
public PrdnCalMonth(int theYear, int theMonth, PrdnEntities thePrdnDB, DateTime maxDate, CST.Prdn.Data.ProductionOrder maxPrdnOrder, DateTime lastRunDate) { year = theYear; month = theMonth; prdnDB = thePrdnDB; firstDayOfMonth = new DateTime(year, month, 1); firstDayOfCalendar = StartOfWeek(firstDayOfMonth, firstDayOfWeek).Date; int nextMonth = firstDayOfMonth.AddMonths(1).Month; int daysInMonth = DateTime.DaysInMonth(year, month); lastDayOfMonth = new DateTime(year, month, daysInMonth).Date; lastDayOfCalendar = StartOfWeek(lastDayOfMonth.AddDays(7), firstDayOfWeek).AddDays(-1).Date; monthName = CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(month); maxCalDate = maxDate; if (maxPrdnOrder != null) { maxProductionOrder = maxPrdnOrder; } else { maxProductionOrder = new CST.Prdn.Data.ProductionOrder() { ShipDay = DateTime.MinValue, OrderNo = "0" }; } lastPrdnOrdRunDt = lastRunDate; }