Exemple #1
0
        /// <summary>
        /// 刷新工位主表信息
        /// </summary>
        private void RefreshStnSummary(string autoQuotationNoStr, string ssNoStr)
        {
            TableStnSummary.Rows.Clear();
            ssDAO.QueryStnSummary(TableStnSummary, autoQuotationNoStr, ssNoStr);
            if (TableStnSummary.Rows.Count > 0)
            {
                btnEditAutoQuotationNo.Text = DataTypeConvert.GetString(TableStnSummary.Rows[0]["AutoQuotationNo"]);
                ssNoStr           = DataTypeConvert.GetString(TableStnSummary.Rows[0]["SSNo"]);
                textPrepared.Text = DataTypeConvert.GetString(TableStnSummary.Rows[0]["Prepared"]);
                textGetTime.Text  = DataTypeConvert.GetDateTime(TableStnSummary.Rows[0]["GetTime"]).ToString("yyyy-MM-dd HH:mm:ss");

                RefreshStnSummaryList(ssNoStr);
            }
            else
            {
                int count = ssDAO.QueryQuotationBaseInfoCount(autoQuotationNoStr);
                if (count > 0)
                {
                    btnEditAutoQuotationNo.Text = autoQuotationNoStr;
                }
                else
                {
                    btnEditAutoQuotationNo.Text = "";
                }
                textPrepared.Text = "";
                textGetTime.Text  = "";

                TableStnList.Rows.Clear();
                TableStnListModule.Rows.Clear();
            }
        }
Exemple #2
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmStnSummary_Load(object sender, EventArgs e)
        {
            try
            {
                LookUpCreator.Properties.DataSource = commonDAO.QueryUserInfo(false);

                repLookUpCreator.DataSource = LookUpCreator.Properties.DataSource;

                if (queryAutoQuotationNoStr == "")
                {
                    ssDAO.QueryStnSummary(TableStnSummary, "", "", true);
                    ssDAO.QueryStnSummaryList(TableStnList, "", true);
                    Set_ButtonEditGrid_State(true);
                }
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
            }
        }