Example #1
0
 /// <summary>
 /// Create a new Timming object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="dayOfWeek">Initial value of the DayOfWeek property.</param>
 /// <param name="from">Initial value of the From property.</param>
 /// <param name="to">Initial value of the To property.</param>
 /// <param name="daysId">Initial value of the DaysId property.</param>
 public static Timming CreateTimming(global::System.Int32 id, global::System.Int32 dayOfWeek, global::System.DateTime from, global::System.DateTime to, global::System.Int32 daysId)
 {
     Timming timming = new Timming();
     timming.Id = id;
     timming.DayOfWeek = dayOfWeek;
     timming.From = from;
     timming.To = to;
     timming.DaysId = daysId;
     return timming;
 }
Example #2
0
 private void setTimmingData(Timming item)
 {
     timmingBindingSource.DataSource = item;
     comboDay.SelectedValue = item.DayOfWeek;
 }
Example #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Timmings EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToTimmings(Timming timming)
 {
     base.AddObject("Timmings", timming);
 }
Example #4
0
        private void clear(bool loadFromDB)
        {
            timmingBindingSource.DataSource = DataLayer.GetTimings(loadFromDB);
            grdTimming.DataSource = timmingBindingSource.DataSource;
            grdTimming.CurrentRow = null;

            Timming tmp = new Timming();
            tmp.To = DateTime.Today;
            tmp.From = DateTime.Today;
            timmingBindingSource.DataSource = tmp;

            comboDay.Focus();
            btnAdd.Enabled = true;
            if (comboDay.Items.Count > 0)
                comboDay.SelectedIndex = 0;
        }