コード例 #1
0
        private void btnPWOModify_Click(object sender, EventArgs e)
        {
            int idx = grdvPWOs.GetFocusedDataSourceRowIndex();

            if (idx >= 0 && idx < pwos.Count)
            {
                EntityBatchPWO pwo = pwos[idx];

                using (Dialogs.frmPWOInProductionEditor formEditor =
                           new Dialogs.frmPWOInProductionEditor(
                               EditStatus.Edit,
                               stationInfo.T134LeafID,
                               stationInfo.T216LeafID,
                               0,
                               pwos,
                               ref pwo))
                {
                    if (formEditor.ShowDialog() == DialogResult.OK)
                    {
                        grdvPWOs.UpdateCurrentRow();
                        grdvPWOs.BestFitColumns();

                        SavePreparationPWOs(stationInfo.T133Code, pwos);
                    }
                }
            }
        }
コード例 #2
0
        private void btnPWONew_Click(object sender, EventArgs e)
        {
            if (cboPrdtType.SelectedItem == null)
            {
                XtraMessageBox.Show(
                    "请先选择产品类别!",
                    "系统信息",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Information);
                cboPrdtType.Focus();
                return;
            }

            BatchRingCategory prdtType = cboPrdtType.SelectedItem as BatchRingCategory;

            EntityBatchPWO newPWO = new EntityBatchPWO();

            using (Dialogs.frmPWOInProductionEditor formEditor =
                       new Dialogs.frmPWOInProductionEditor(
                           EditStatus.New,
                           stationInfo.T134LeafID,
                           stationInfo.T216LeafID,
                           prdtType.T131LeafID,
                           pwos,
                           ref newPWO))
            {
                if (formEditor.ShowDialog() == DialogResult.OK)
                {
                    pwos.Add(newPWO);
                    grdvPWOs.BestFitColumns();
                }
            }
        }
コード例 #3
0
        private void btnPWONew_Click(object sender, EventArgs e)
        {
            EntityBatchPWO newPWO = new EntityBatchPWO();

            using (Dialogs.frmPWOInProductionEditor formEditor =
                       new Dialogs.frmPWOInProductionEditor(
                           EditStatus.New,
                           stationInfo.T134LeafID,
                           stationInfo.T216LeafID,
                           0,
                           pwos,
                           ref newPWO))
            {
                if (formEditor.ShowDialog() == DialogResult.OK)
                {
                    pwos.Add(newPWO);
                    grdvPWOs.BestFitColumns();

                    SavePreparationPWOs(stationInfo.T133Code, pwos);
                }
            }
        }
コード例 #4
0
        private void btnPWOModify_Click(object sender, EventArgs e)
        {
            if (cboPrdtType.SelectedItem == null)
            {
                XtraMessageBox.Show(
                    "请先选择产品类别!",
                    "系统信息",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Information);
                cboPrdtType.Focus();
                return;
            }

            BatchRingCategory prdtType = cboPrdtType.SelectedItem as BatchRingCategory;
            int idx = grdvPWOs.GetFocusedDataSourceRowIndex();

            if (idx >= 0 && idx < pwos.Count)
            {
                EntityBatchPWO pwo = pwos[idx];

                using (Dialogs.frmPWOInProductionEditor formEditor =
                           new Dialogs.frmPWOInProductionEditor(
                               EditStatus.Edit,
                               stationInfo.T134LeafID,
                               stationInfo.T216LeafID,
                               prdtType.T131LeafID,
                               pwos,
                               ref pwo))
                {
                    if (formEditor.ShowDialog() == DialogResult.OK)
                    {
                        grdvPWOs.UpdateCurrentRow();

                        grdvPWOs.BestFitColumns();
                    }
                }
            }
        }