示例#1
0
        private void btnConfirm_Click(object sender, EventArgs e)
        {
            if (tbLine.Text.Trim() == string.Empty ||
                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 = ASS.GetCurrentDepartment();

            if (department != null)
            {
                var row = department.OrderList.NewRow();
                row["Guid"]         = Guid.NewGuid().ToString();
                row["Line"]         = tbLine.Text;
                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();
        }
示例#2
0
        public ASSOrder(int rowIndex)
        {
            InitializeComponent();

            if (rowIndex >= 0)
            {
                RowIndex = rowIndex;
                LoadData(ASS.GetCurrentDepartment().OrderList.Rows[rowIndex]);
            }
        }