Esempio n. 1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the OutboundOrders EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToOutboundOrders(OutboundOrder outboundOrder)
 {
     base.AddObject("OutboundOrders", outboundOrder);
 }
Esempio n. 2
0
        private void LoadData()
        {
            SystemHelper.BindComboxToCustomer(cbCustomer);
            SystemHelper.BindComboxToSystemUser(cbSystemUser);

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

            if (CurrentMode == MODE_CREATE)
            {
                CurrentOrder.Version = 0;
                CurrentOrder.SystemUser = SystemHelper.CurrentUser;
                ItemCount = 0;
            }
            else if (CurrentMode == MODE_APPEND)
            {
                CurrentOrder.Version ++;
                CurrentOrder.SystemUser = SystemHelper.CurrentUser;
                ItemCount = CurrentOrder.Items.Count;
            }
            else if (CurrentMode == MODE_BROWSE)
            {
                ItemCount = CurrentOrder.Items.Count;
            }

            txtCode.Text = CurrentOrder.Code;
            dtOutboundDate.Value = CurrentOrder.OutboundDate;
            txtVersion.Text = CurrentOrder.Version.ToString();
            txtJob.Text = CurrentOrder.Job;

            txtBerth.Text = CurrentOrder.Berth;
            txtMachine.Text = CurrentOrder.Machine;
            txtShip.Text = CurrentOrder.Ship;
            txtHatch.Text = CurrentOrder.Hatch;
            txtCargo.Text = CurrentOrder.Cargo;
            txtQuantity.Text = CurrentOrder.Quantity;
            txtProcess.Text = CurrentOrder.Process;

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

            foreach (OutboundOrderDetail item in CurrentOrder.Items)
            {
                DataGridViewRow dgvr = new DataGridViewRow();
                //dgvr.Cells["ItemCode"].Value = item.Tool.Code;
                //dgvr.Cells["ItemQuantity"].Value = item.Quantity;
                //dgvr.Cells["ItemName"].Value = item.Tool.Name;
                //dgvr.Cells["ItemDimensions"].Value = item.Tool.Dimensions;
                object[] row = { item.Tool.Code, item.Quantity, item.Tool.Name, item.Tool.Dimensions };
                dataGridViewDetail.Rows.Add(row);
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Create a new OutboundOrder object.
 /// </summary>
 /// <param name="outboundOrderID">Initial value of the OutboundOrderID property.</param>
 /// <param name="outboundDate">Initial value of the OutboundDate property.</param>
 /// <param name="version">Initial value of the Version property.</param>
 /// <param name="code">Initial value of the Code property.</param>
 /// <param name="customerID">Initial value of the CustomerID property.</param>
 /// <param name="lastUpdatedBy">Initial value of the LastUpdatedBy property.</param>
 /// <param name="lastUpdateTime">Initial value of the LastUpdateTime property.</param>
 public static OutboundOrder CreateOutboundOrder(global::System.Int32 outboundOrderID, global::System.DateTime outboundDate, global::System.Int32 version, global::System.String code, global::System.Int32 customerID, global::System.Int32 lastUpdatedBy, global::System.DateTime lastUpdateTime)
 {
     OutboundOrder outboundOrder = new OutboundOrder();
     outboundOrder.OutboundOrderID = outboundOrderID;
     outboundOrder.OutboundDate = outboundDate;
     outboundOrder.Version = version;
     outboundOrder.Code = code;
     outboundOrder.CustomerID = customerID;
     outboundOrder.LastUpdatedBy = lastUpdatedBy;
     outboundOrder.LastUpdateTime = lastUpdateTime;
     return outboundOrder;
 }