Ejemplo n.º 1
0
        /// <summary>
        /// 绑定站号的ComboBox控件
        /// </summary>
        private void BingStnListComboBox(string projectNoStr)
        {
            DataTable stnListTable = commonDAO.QueryStnList(projectNoStr);

            repComboBoxStnNo.Items.Clear();
            for (int i = 0; i < stnListTable.Rows.Count; i++)
            {
                repComboBoxStnNo.Items.Add(DataTypeConvert.GetString(stnListTable.Rows[i]["StnNo"]));
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 绑定站号的ComboBox控件
        /// </summary>
        private void BingStnListComboBox()
        {
            string    tmpStr       = DataTypeConvert.GetString(gridViewPrReqHead.GetFocusedDataRow()["ProjectNo"]);
            DataTable stnListTable = commonDAO.QueryStnList(tmpStr);

            repComboBoxStnNo.Items.Clear();
            for (int i = 0; i < stnListTable.Rows.Count; i++)
            {
                repComboBoxStnNo.Items.Add(DataTypeConvert.GetString(stnListTable.Rows[i]["StnNo"]));
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmPSBomToPrReq_Load(object sender, EventArgs e)
        {
            try
            {
                textPbBomNo.Text = pbBomNoStr;

                lookUpReqDep.Properties.DataSource = commonDAO.QueryDepartment(false);
                lookUpReqDep.EditValue             = SystemInfo.user.DepartmentNo;

                searchLookUpProjectNo.Properties.DataSource = commonDAO.QueryProjectList(false);
                searchLookUpProjectNo.Text = projectNoStr;

                DataTable tempTable = commonDAO.QueryStnList(projectNoStr);
                searchLookUpStnNo.Properties.DataSource = tempTable;
                if (tempTable.Rows.Count > 0)
                {
                    searchLookUpStnNo.EditValue = tempTable.Rows[0]["StnNo"];
                }

                lookUpPurCategory.Properties.DataSource = commonDAO.QueryPurCategory(false);
                lookUpPurCategory.ItemIndex             = 0;

                lookUpEditApprovalType.Properties.DataSource = commonDAO.QueryApprovalType(false);
                lookUpEditApprovalType.ItemIndex             = 0;

                DataTable psBomTable = PStoPRDAO.Query_NoPr_PSBom(pbBomNoStr, bomListAutoIdInt);
                gridControlPSBom.DataSource = psBomTable;
                if (psBomTable.Rows.Count == 0)
                {
                    MessageHandler.ShowMessageBox("当前选中的制作Bom信息没有生产计划,不能生成请购单。");
                    this.Close();
                    return;
                }
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
            }
        }