Exemplo n.º 1
0
 public Retur(Member ActualMember, Tool ActualTool)
 {
     InitializeComponent();
     dateTimePicker1.Value = DateTime.Now;
     this.MyMember = ActualMember;
     textBox1.Text = MyMember.Name;
     this.MyTool = ActualTool;
 }
Exemplo n.º 2
0
 public Udlejning(Member ActualMember, Location ActualReservation)
 {
     InitializeComponent();
     this.MyMember = ActualMember;
     textBox1.Text = MyMember.Name;
     if (ActualReservation != null)
     {
         this.MyTool = ActualReservation.Tool;
         this.MyReservation = ActualReservation;
     }
 }
Exemplo n.º 3
0
        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());
            }
        }
Exemplo n.º 4
0
 private void tools1_OnToolSelected(Tool obj)
 {
     MyTool = tools1.SelectedTool;
 }
Exemplo n.º 5
0
 public ToolForm(Tool tool)
 {
     this.tool = tool;
     InitializeComponent();
 }
Exemplo n.º 6
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Tool EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToTool(Tool tool)
 {
     base.AddObject("Tool", tool);
 }
Exemplo n.º 7
0
 /// <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;
 }