Пример #1
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmProductOpenAccount_Load(object sender, EventArgs e)
        {
            try
            {
                DateTime nowDate = BaseSQL.GetServerDateTime();
                dateOpBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DateIntervalDays);
                dateOpEnd.DateTime   = nowDate.Date;

                DataTable repertoryTable_t = commonDAO.QueryRepertoryInfo(true);

                lookUpRepertoryId.Properties.DataSource = repertoryTable_t;
                lookUpRepertoryId.ItemIndex             = 0;
                //SearchLocationId.Properties.DataSource = locationTable_t;
                //SearchLocationId.EditValue = 0;
                //searchLookUpProjectNo.Properties.DataSource = commonDAO.QueryProjectList(true);
                //searchLookUpProjectNo.Text = "全部";
                //searchLookUpShelfId.Properties.DataSource = shelfTable_t;
                //searchLookUpShelfId.EditValue = 0;
                //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.SearchLookUpEdit_ShelfInfo(searchLookUpShelfId, true);
                searchLookUpShelfId.EditValue = 0;
                ctlInit.SearchLookUpEdit_RepertoryLocationInfo(SearchLocationId, true);
                SearchLocationId.EditValue = 0;

                //repLookUpRepertoryId.DataSource = commonDAO.QueryRepertoryInfo(false);
                //repLookUpLocationId.DataSource = commonDAO.QueryRepertoryLocationInfo(false);
                repLookUpRepertoryId.DataSource = repertoryTable_t;
                repLookUpLocationId.DataSource  = SearchLocationId.Properties.DataSource;
                repLookUpShelfId.DataSource     = searchLookUpShelfId.Properties.DataSource;

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

                if (SystemInfo.DisableShelfInfo)
                {
                    labShelfId.Visible          = false;
                    searchLookUpShelfId.Visible = false;
                    colShelfId.Visible          = false;
                }

                gridBottomWNowInfo.pageRowCount = SystemInfo.OrderQueryGrid_PageRowCount;
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
            }
        }
Пример #2
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmWarehouseNowInfo_Load(object sender, EventArgs e)
        {
            try
            {
                DataTable repertoryTable_t = commonDAO.QueryRepertoryInfo(true);
                DataTable catgNameTable_f  = commonDAO.QueryPartNoCatg(false);

                lookUpRepertoryId.Properties.DataSource = repertoryTable_t;
                lookUpRepertoryId.ItemIndex             = 0;
                //SearchLocationId.Properties.DataSource = locationTable_t;
                //SearchLocationId.EditValue = 0;
                //searchLookUpShelfId.Properties.DataSource = shelfTable_t;
                //searchLookUpShelfId.EditValue = 0;
                //searchLookUpProjectNo.Properties.DataSource = commonDAO.QueryProjectList(true);
                //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.SearchLookUpEdit_ShelfInfo(searchLookUpShelfId, true);
                searchLookUpShelfId.EditValue = 0;
                ctlInit.SearchLookUpEdit_RepertoryLocationInfo(SearchLocationId, true);
                SearchLocationId.EditValue = 0;

                //repLookUpRepertoryId.DataSource = commonDAO.QueryRepertoryInfo(false);
                //repLookUpLocationId.DataSource = commonDAO.QueryRepertoryLocationInfo(false);
                //repLookUpShelfId.DataSource = commonDAO.QueryShelfInfo(false);
                repLookUpRepertoryId.DataSource = repertoryTable_t;
                repLookUpLocationId.DataSource  = SearchLocationId.Properties.DataSource;
                repLookUpShelfId.DataSource     = searchLookUpShelfId.Properties.DataSource;
                repLookUpCatgName.DataSource    = catgNameTable_f;

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

                if (SystemInfo.DisableShelfInfo)
                {
                    labShelfId.Visible          = false;
                    searchLookUpShelfId.Visible = false;
                    colShelfId.Visible          = false;
                }

                gridBottomWNowInfo.pageRowCount = SystemInfo.OrderQueryGrid_PageRowCount;
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCtjzsjcw.Text, ex);
            }
        }