Exemple #1
0
 /// <summary>
 /// Create a new RepairOrder object.
 /// </summary>
 /// <param name="repairOrderID">Initial value of the RepairOrderID property.</param>
 /// <param name="repairDate">Initial value of the RepairDate property.</param>
 /// <param name="code">Initial value of the Code property.</param>
 /// <param name="status">Initial value of the Status property.</param>
 /// <param name="lastUpdatedBy">Initial value of the LastUpdatedBy property.</param>
 /// <param name="lastUpdateTime">Initial value of the LastUpdateTime property.</param>
 public static RepairOrder CreateRepairOrder(global::System.Int32 repairOrderID, global::System.DateTime repairDate, global::System.String code, global::System.Int32 status, global::System.Int32 lastUpdatedBy, global::System.DateTime lastUpdateTime)
 {
     RepairOrder repairOrder = new RepairOrder();
     repairOrder.RepairOrderID = repairOrderID;
     repairOrder.RepairDate = repairDate;
     repairOrder.Code = code;
     repairOrder.Status = status;
     repairOrder.LastUpdatedBy = lastUpdatedBy;
     repairOrder.LastUpdateTime = lastUpdateTime;
     return repairOrder;
 }
Exemple #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the RepairOrders EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToRepairOrders(RepairOrder repairOrder)
 {
     base.AddObject("RepairOrders", repairOrder);
 }
Exemple #3
0
        private void LoadData()
        {
            SystemHelper.BindComboxToCustomer(cbCustomer);
            SystemHelper.BindComboxToSystemUser(cbSystemUser);

            // Set data object value
            if (CurrentOrder == null)
            {
                CurrentOrder = new RepairOrder();
                CurrentMode = MODE_CREATESELF;
            }

            if (CurrentMode == MODE_CREATESELF)
            {
                CurrentOrder.Status = 1;
                CurrentOrder.SystemUser = SystemHelper.CurrentUser;
            }

            txtCode.Text = CurrentOrder.Code;
            dtRepairDate.Value = CurrentOrder.RepairDate;

            cbCustomer.SelectedItem = CurrentOrder.Customer;
            cbSystemUser.SelectedItem = CurrentOrder.SystemUser;

            foreach (RepairOrderDetail item in CurrentOrder.Items)
            {
                DataGridViewRow dgvr = new DataGridViewRow();
                object[] row = { item.RepairOrderDetailID, item.Tool.Code, item.RepairingQuantity, item.Tool.Name, item.Tool.Dimensions, item.Quantity, item.Quantity, item.ScrapQuantity, item.ScrapReason };
                dataGridViewDetail.Rows.Add(row);
            }
        }