Example #1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the ProductionSchedules EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToProductionSchedules(ProductionSchedule productionSchedule)
 {
     base.AddObject("ProductionSchedules", productionSchedule);
 }
        public static void turnLights(bool on, string line)
        {
            DateTime now = convertToTimeZone(DateTime.Now, line);

            if (hasLightsOnFeature())
            {
                using (DB db = new DB(DBHelper.GetConnectionString(Filter_Client)))
                {
                    ProductionSchedule ps = new ProductionSchedule();

                    ps.EventTime = now;
                    ps.Client = Filter_Client;
                    ps.Line = line;
                    ps.LightsOn = on;

                    db.AddToProductionSchedules(ps);

                    int res = db.SaveChanges();
                }
            }
        }
Example #3
0
 /// <summary>
 /// Create a new ProductionSchedule object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="client">Initial value of the Client property.</param>
 /// <param name="line">Initial value of the Line property.</param>
 /// <param name="eventTime">Initial value of the EventTime property.</param>
 /// <param name="lightsOn">Initial value of the LightsOn property.</param>
 public static ProductionSchedule CreateProductionSchedule(global::System.Int32 id, global::System.String client, global::System.String line, global::System.DateTime eventTime, global::System.Boolean lightsOn)
 {
     ProductionSchedule productionSchedule = new ProductionSchedule();
     productionSchedule.Id = id;
     productionSchedule.Client = client;
     productionSchedule.Line = line;
     productionSchedule.EventTime = eventTime;
     productionSchedule.LightsOn = lightsOn;
     return productionSchedule;
 }