Пример #1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the ProductionOrders EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToProductionOrders(ProductionOrder productionOrder)
 {
     base.AddObject("ProductionOrders", productionOrder);
 }
Пример #2
0
 /// <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;
 }
Пример #3
0
        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;
        }