Ejemplo n.º 1
0
        private void btnConfirm_Click(object sender, EventArgs e)
        {
            if (tbModel.Text.Trim() == string.Empty ||
                tbIPN.Text.Trim() == string.Empty ||
                tbMO.Text.Trim() == string.Empty ||
                tbPN.Text.Trim() == string.Empty ||
                tbRequset_Qty.Text.Trim() == string.Empty ||
                dtpRequest_Time.Text.Trim() == string.Empty)
            {
                MessageBox.Show("所有项均要填写");
                return;
            }

            var department = WH.GetCurrentDepartment();

            if (department != null)
            {
                var row = department.OrderList.NewRow();
                row["Guid"]         = Guid.NewGuid().ToString();
                row["Model"]        = tbModel.Text;
                row["IPN"]          = tbIPN.Text;
                row["MO"]           = tbMO.Text;
                row["Process"]      = tbProcess.Text;
                row["P/N"]          = tbPN.Text;
                row["Requset_Qty"]  = tbRequset_Qty.Text;
                row["Request_Time"] = dtpRequest_Time.Text;
                row["Status"]       = Global.UnKnown;
                department.OrderList.Rows.InsertAt(row, 0);
            }


            this.Close();
        }
Ejemplo n.º 2
0
 public WHOrder(int rowIndex)
 {
     InitializeComponent();
     if (rowIndex >= 0)
     {
         RowIndex = rowIndex;
         LoadData(WH.GetCurrentDepartment().OrderList.Rows[rowIndex]);
     }
 }