Example #1
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmWarehouseReceiptQuery_Load(object sender, EventArgs e)
        {
            try
            {
                ControlCommonInit ctlInit = new ControlCommonInit();

                DateTime nowDate = BaseSQL.GetServerDateTime();
                dateWRDateBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DateIntervalDays);
                dateWRDateEnd.DateTime   = nowDate.Date;

                DataTable departmentTable_t = commonDAO.QueryDepartment(true);
                DataTable repertoryTable_t  = commonDAO.QueryRepertoryInfo(true);
                DataTable wrTypeTable_t     = wrDAO.QueryWarehouseReceiptType(true);
                DataTable manuInfoTable_t   = commonDAO.QueryManufactureInfo(true);

                lookUpReqDep.Properties.DataSource      = departmentTable_t;
                lookUpReqDep.ItemIndex                  = 0;
                lookUpRepertoryId.Properties.DataSource = repertoryTable_t;
                lookUpRepertoryId.ItemIndex             = 0;
                //SearchLocationId.Properties.DataSource = locationTable_t;
                //SearchLocationId.EditValue = 0;
                ctlInit.SearchLookUpEdit_RepertoryLocationInfo(SearchLocationId, true);
                SearchLocationId.EditValue = 0;
                lookUpWarehouseReceiptTypeNo.Properties.DataSource = wrTypeTable_t;
                lookUpWarehouseReceiptTypeNo.ItemIndex             = 0;
                lookUpManufactureNo.Properties.DataSource          = manuInfoTable_t;
                lookUpManufactureNo.ItemIndex = 0;
                ctlInit.ComboBoxEdit_WarehouseState(comboBoxWarehouseState);
                comboBoxWarehouseState.SelectedIndex = 0;
                ctlInit.SearchLookUpEdit_UserInfo_ValueMember_AutoId(searchLookUpCreator);
                searchLookUpCreator.EditValue = SystemInfo.user.AutoId;

                //repLookUpReqDep.DataSource = commonDAO.QueryDepartment(false);
                //repLookUpRepertoryId.DataSource = commonDAO.QueryRepertoryInfo(false);
                //repLookUpRepertoryLocationId.DataSource = commonDAO.QueryRepertoryLocationInfo(false);
                //repLookUpWRTypeNo.DataSource = wrDAO.QueryWarehouseReceiptType(false);
                //repLookUpManufactureNo.DataSource = wrDAO.QueryManufactureInfo(false);
                repLookUpReqDep.DataSource              = departmentTable_t;
                repLookUpRepertoryId.DataSource         = repertoryTable_t;
                repLookUpRepertoryLocationId.DataSource = SearchLocationId.Properties.DataSource;
                repLookUpWRTypeNo.DataSource            = wrTypeTable_t;
                repLookUpManufactureNo.DataSource       = manuInfoTable_t;
                repLookUpApprovalType.DataSource        = commonDAO.QueryApprovalType(false);
                repLookUpCreator.DataSource             = searchLookUpCreator.Properties.DataSource;

                gridBottomOrderHead.pageRowCount = SystemInfo.OrderQueryGrid_PageRowCount;

                btnQuery_Click(null, null);
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCtjzsjcw.Text, ex);
            }
        }
Example #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);
            }
        }