Beispiel #1
0
        /// <summary>
        /// 窗体加载事件错误
        /// </summary>
        private void FrmOrderArrivalQuery_Load(object sender, EventArgs e)
        {
            try
            {
                DateTime nowDate = BaseSQL.GetServerDateTime();
                dateOrderDateBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DateIntervalDays);
                dateOrderDateEnd.DateTime   = nowDate.Date;
                datePlanDateBegin.DateTime  = nowDate.Date;
                datePlanDateEnd.DateTime    = nowDate.Date.AddDays(SystemInfo.OrderQueryDate_DateIntervalDays);
                checkPlanDate.Checked       = false;

                DataTable departmentTable_t = commonDAO.QueryDepartment(true);
                DataTable bussInfoTable_t   = commonDAO.QueryBussinessBaseInfo(true);
                DataTable purCateTable_t    = commonDAO.QueryPurCategory(true);

                lookUpReqDep.Properties.DataSource = departmentTable_t;
                lookUpReqDep.ItemIndex             = 0;
                searchLookUpBussinessBaseNo.Properties.DataSource = bussInfoTable_t;
                searchLookUpBussinessBaseNo.Text        = "全部";
                lookUpPurCategory.Properties.DataSource = purCateTable_t;
                lookUpPurCategory.ItemIndex             = 0;
                //searchLookUpProjectNo.Properties.DataSource = projectTable_t;
                //searchLookUpProjectNo.Text = "全部";
                //searchLookUpCodeFileName.Properties.DataSource = commonDAO.QueryPartsCode(true);
                //searchLookUpCodeFileName.EditValue = 0;

                ControlCommonInit ctlInit = new ControlCommonInit();
                ctlInit.SearchLookUpEdit_PartsCode(searchLookUpCodeFileName, true);
                searchLookUpCodeFileName.EditValue = 0;
                ctlInit.SearchLookUpEdit_ProjectList(searchLookUpProjectNo, true);
                searchLookUpProjectNo.Text = "全部";
                ctlInit.ComboBoxEdit_OrderState_Submit(comboBoxReqState);
                comboBoxReqState.SelectedIndex = 0;

                //repLookUpReqDep.DataSource = commonDAO.QueryDepartment(false);
                //repSearchBussinessBaseNo.DataSource = commonDAO.QueryBussinessBaseInfo(false);
                //repLookUpPurCategory.DataSource = commonDAO.QueryPurCategory(false);
                //repSearchProjectNo.DataSource = commonDAO.QueryProjectList(false);
                repLookUpReqDep.DataSource          = departmentTable_t;
                repSearchBussinessBaseNo.DataSource = bussInfoTable_t;
                repLookUpPurCategory.DataSource     = purCateTable_t;
                repSearchProjectNo.DataSource       = searchLookUpProjectNo.Properties.DataSource;

                if (SystemInfo.DisableProjectNo)
                {
                    labProjectNo.Visible          = false;
                    searchLookUpProjectNo.Visible = false;
                    colProjectNo.Visible          = false;
                    colStnNo.Visible = false;
                }

                gridBottomOrderHead.pageRowCount = SystemInfo.OrderQueryGrid_PageRowCount;

                btnQuery_Click(null, null);
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
            }
        }
Beispiel #2
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmProductionPlanQuery_Load(object sender, EventArgs e)
        {
            try
            {
                DateTime nowDate = BaseSQL.GetServerDateTime();
                datePlanDateBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DateIntervalDays);
                datePlanDateEnd.DateTime   = nowDate.Date;

                DataTable manuInfoTable_t = commonDAO.QueryManufactureInfo(true);

                lookUpManufactureNo.Properties.DataSource = manuInfoTable_t;
                lookUpManufactureNo.ItemIndex             = 0;
                //searchLookUpCodeFileName.Properties.DataSource = commonDAO.QueryPartsCode(true);
                //searchLookUpCodeFileName.EditValue = 0;
                //searchLookUpProjectNo.Properties.DataSource = projectTable_t;
                //searchLookUpProjectNo.Text = "全部";

                ControlCommonInit ctlInit = new ControlCommonInit();
                ctlInit.SearchLookUpEdit_UserInfo_ValueMember_AutoId(searchLookUpCreator);
                searchLookUpCreator.EditValue = SystemInfo.user.AutoId;
                ctlInit.SearchLookUpEdit_PartsCode(searchLookUpCodeFileName, true);
                searchLookUpCodeFileName.EditValue = 0;
                ctlInit.SearchLookUpEdit_ProjectList(searchLookUpProjectNo, true);
                searchLookUpProjectNo.Text = "全部";
                ctlInit.ComboBoxEdit_OrderState_Submit(comboBoxCurrentStatus, false);
                comboBoxCurrentStatus.SelectedIndex = 0;

                repLookUpManufactureNo.DataSource = manuInfoTable_t;
                repSearchProjectNo.DataSource     = searchLookUpProjectNo.Properties.DataSource;
                repLookUpCreator.DataSource       = searchLookUpCreator.Properties.DataSource;

                gridBottomOrderHead.pageRowCount = SystemInfo.OrderQueryGrid_PageRowCount;

                if (SystemInfo.DisableProjectNo)
                {
                    labProjectNo.Visible          = false;
                    searchLookUpProjectNo.Visible = false;
                    colProjectNo.Visible          = false;
                }

                btnQuery_Click(null, null);
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
            }
        }
Beispiel #3
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmPrReqQuery_Load(object sender, EventArgs e)
        {
            try
            {
                DataTable departmentTable_t = commonDAO.QueryDepartment(true);
                DataTable purCateTable_t    = commonDAO.QueryPurCategory(true);

                lookUpReqDep.Properties.DataSource      = departmentTable_t;
                lookUpReqDep.ItemIndex                  = 0;
                lookUpPurCategory.Properties.DataSource = purCateTable_t;
                lookUpPurCategory.ItemIndex             = 0;

                ControlCommonInit ctlInit = new ControlCommonInit();
                ctlInit.SearchLookUpEdit_UserInfo_ValueMember_AutoId(searchLookUpCreator);
                searchLookUpCreator.EditValue = SystemInfo.user.AutoId;
                ctlInit.ComboBoxEdit_OrderState_Submit(comboBoxReqState);
                comboBoxReqState.SelectedIndex = 0;

                //repLookUpReqDep.DataSource = commonDAO.QueryDepartment(false);
                //repLookUpPurCategory.DataSource = commonDAO.QueryPurCategory(false);
                repLookUpReqDep.DataSource      = departmentTable_t;
                repLookUpPurCategory.DataSource = purCateTable_t;
                repLookUpCreator.DataSource     = searchLookUpCreator.Properties.DataSource;

                DateTime nowDate = BaseSQL.GetServerDateTime();
                dateReqDateBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DateIntervalDays);
                dateReqDateEnd.DateTime   = nowDate.Date;

                if (SystemInfo.DisableProjectNo)
                {
                    colProjectNo.Visible = false;
                    colStnNo.Visible     = false;
                }

                gridBottomPrReq.pageRowCount = SystemInfo.OrderQueryGrid_PageRowCount;

                btnQuery_Click(null, null);
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + tsmiCt.Text, ex);
            }
        }