Beispiel #1
0
        private void LoadData()
        {
            var query = from c in SystemHelper.TMSContext.ToolCategories
                        where c.Deleted == false
                        orderby c.Code
                        select c;
            cbCategory.DataSource = query;
            cbCategory.DisplayMember = "Name";

            cbCategory.SelectedItem = CurrentCategory;

            if (CurrentTool == null)
                CurrentTool = new Tool();

            txtCode.Text = CurrentTool.Code;
            txtComment.Text = CurrentTool.Comment;
            txtDescription.Text = CurrentTool.Description;
            txtDiameter.Text = CurrentTool.Diameter;
            txtDimensions.Text = CurrentTool.Dimensions;
            txtLength.Text = CurrentTool.Length;
            txtLoad2.Text = CurrentTool.Load2;
            txtName.Text = CurrentTool.Name;
            txtUnit.Text = CurrentTool.Unit;
            txtRatedQuantity.Text = CurrentTool.RatedQuantity.ToString();
        }
Beispiel #2
0
 /// <summary>
 /// Create a new Tool object.
 /// </summary>
 /// <param name="toolID">Initial value of the ToolID property.</param>
 /// <param name="toolCategoryID">Initial value of the ToolCategoryID property.</param>
 /// <param name="code">Initial value of the Code property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="dimensions">Initial value of the Dimensions property.</param>
 /// <param name="unit">Initial value of the Unit property.</param>
 /// <param name="deleted">Initial value of the Deleted property.</param>
 /// <param name="ratedQuantity">Initial value of the RatedQuantity property.</param>
 public static Tool CreateTool(global::System.Int32 toolID, global::System.Int32 toolCategoryID, global::System.String code, global::System.String name, global::System.String dimensions, global::System.String unit, global::System.Boolean deleted, global::System.Decimal ratedQuantity)
 {
     Tool tool = new Tool();
     tool.ToolID = toolID;
     tool.ToolCategoryID = toolCategoryID;
     tool.Code = code;
     tool.Name = name;
     tool.Dimensions = dimensions;
     tool.Unit = unit;
     tool.Deleted = deleted;
     tool.RatedQuantity = ratedQuantity;
     return tool;
 }
Beispiel #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Tools EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToTools(Tool tool)
 {
     base.AddObject("Tools", tool);
 }