public Retur(Member ActualMember, Tool ActualTool) { InitializeComponent(); dateTimePicker1.Value = DateTime.Now; this.MyMember = ActualMember; textBox1.Text = MyMember.Name; this.MyTool = ActualTool; }
public Udlejning(Member ActualMember, Location ActualReservation) { InitializeComponent(); this.MyMember = ActualMember; textBox1.Text = MyMember.Name; if (ActualReservation != null) { this.MyTool = ActualReservation.Tool; this.MyReservation = ActualReservation; } }
private void tools1_OnToolSelected(Tool obj) { using (var db = new HobbyKlubEntities1()) { var rv = db.Location.Where(x => x.ToolId == tools1.SelectedTool.ToolId && x.Status > (int)Status.Afleveret && x.EndDate >= DateTime.Now); foreach (var loc in rv) // mark all days where the tool is not available { DateTime start = (DateTime)loc.StartDate; DateTime end = (DateTime)loc.EndDate; for (DateTime l = start; l <= end; l = l.AddDays(1)) { monthCalendar1.AddBoldedDate(l); } } monthCalendar1.UpdateBoldedDates(); locationListOfSelectedTool = rv.ToList(); listBox1.Items.Clear(); listBox1.Items.AddRange(locationListOfSelectedTool.Select(x => x.StartDate.ToShortDateString() + " ... " + x.EndDate.ToString().Substring(0, 8) + "\t" + x.Member.Name + "\t" + ((Status)x.Status).ToString()).ToArray()); } }
private void tools1_OnToolSelected(Tool obj) { MyTool = tools1.SelectedTool; }
public ToolForm(Tool tool) { this.tool = tool; InitializeComponent(); }
/// <summary> /// Deprecated Method for adding a new object to the Tool EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToTool(Tool tool) { base.AddObject("Tool", tool); }
/// <summary> /// Create a new Tool object. /// </summary> /// <param name="toolId">Initial value of the ToolId property.</param> /// <param name="name">Initial value of the Name property.</param> /// <param name="k_number">Initial value of the K_number property.</param> /// <param name="active">Initial value of the Active property.</param> public static Tool CreateTool(global::System.Int32 toolId, global::System.String name, global::System.Int32 k_number, global::System.Boolean active) { Tool tool = new Tool(); tool.ToolId = toolId; tool.Name = name; tool.K_number = k_number; tool.Active = active; return tool; }