Esempio n. 1
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmPartsCodeImport_Load(object sender, EventArgs e)
        {
            try
            {
                repSearchLookUpMaterial.DataSource = commonDAO.QueryMaterialSelectLib(false);

                repLookUpCatgName.DataSource       = commonDAO.QueryPartNoCatg(false);
                repLookUpBrand.DataSource          = commonDAO.QueryBrandCatg(false);
                repLookUpFinish.DataSource         = commonDAO.QueryFinishCatg(false);
                repLookUpMachiningLevel.DataSource = commonDAO.QueryLevelCatg(false);
                repLookUpUnit.DataSource           = commonDAO.QueryUnitCatg(false);

                comboBoxColumn.Properties.Items.Clear();
                for (int i = 0; i < TablePartsCode.Columns.Count; i++)
                {
                    comboBoxColumn.Properties.Items.Add(TablePartsCode.Columns[i].ColumnName);
                }

                comboBoxColumn.Properties.Items.Remove("AutoId");
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmPartsCodeQuery_Load(object sender, EventArgs e)
        {
            try
            {
                DataTable materialTable_t = commonDAO.QueryMaterialSelectLib(true);
                DataTable catgNameTable_t = commonDAO.QueryPartNoCatg(true);
                DataTable finishTable_f   = commonDAO.QueryFinishCatg(false);
                DataTable machTable_f     = commonDAO.QueryLevelCatg(false);

                searchLookUpMaterial.Properties.DataSource = materialTable_t;
                searchLookUpMaterial.EditValue             = 0;
                lookUpCatgName.Properties.DataSource       = catgNameTable_t;
                lookUpCatgName.ItemIndex          = 0;
                lookUpBrand.Properties.DataSource = commonDAO.QueryBrandCatg(true);
                lookUpBrand.ItemIndex             = 0;

                repLookUpMaterial.DataSource       = materialTable_t;
                repLookUpCatgName.DataSource       = catgNameTable_t;
                repLookUpFinish.DataSource         = finishTable_f;
                repLookUpMachiningLevel.DataSource = machTable_f;

                gridBottomPrReq.pageRowCount = SystemInfo.OrderQueryGrid_PageRowCount;
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
            }
        }
Esempio n. 3
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);
            }
        }
Esempio n. 4
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmQueryStockDurationTotal_Load(object sender, EventArgs e)
        {
            try
            {
                DateTime nowDate = BaseSQL.GetServerDateTime();
                dateDurBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DateIntervalDays);
                dateDurEnd.DateTime   = nowDate.Date;

                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;
                //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_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;
                repLookUpCatgName.DataSource    = catgNameTable_f;

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

                gridBottomWNowInfo.pageRowCount = SystemInfo.OrderQueryGrid_PageRowCount;
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
            }
        }
Esempio n. 5
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmPBBomManagement_Load(object sender, EventArgs e)
        {
            try
            {
                searchCodeFileName.Properties.DataSource = commonDAO.QueryPartsCode(false);
                lookUpCatgName.Properties.DataSource     = commonDAO.QueryPartNoCatg(true);
                lookUpCatgName.ItemIndex          = 0;
                lookUpBrand.Properties.DataSource = commonDAO.QueryBrandCatg(true);
                lookUpBrand.ItemIndex             = 0;

                btnEditAutoSalesOrderNo.Focus();
                btnEditAutoSalesOrderNo.SelectAll();
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
            }
        }
Esempio n. 6
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmPartsCode_Load(object sender, EventArgs e)
        {
            try
            {
                DataTable materialTable_f = commonDAO.QueryMaterialSelectLib(false);
                DataTable catgNameTable_f = commonDAO.QueryPartNoCatg(false);
                DataTable finishTable_f   = commonDAO.QueryFinishCatg(false);
                DataTable machTable_f     = commonDAO.QueryLevelCatg(false);

                searchLookUpMaterial.Properties.DataSource = materialTable_f;
                lookUpCatgName.Properties.DataSource       = catgNameTable_f;
                lookUpBrand.Properties.DataSource          = commonDAO.QueryBrandCatg(false);
                lookUpFinish.Properties.DataSource         = finishTable_f;
                lookUpMachiningLevel.Properties.DataSource = machTable_f;
                lookUpUnit.Properties.DataSource           = commonDAO.QueryUnitCatg(false);

                repLookUpMaterial.DataSource       = materialTable_f;
                repLookUpCatgName.DataSource       = catgNameTable_f;
                repLookUpFinish.DataSource         = finishTable_f;
                repLookUpMachiningLevel.DataSource = machTable_f;

                priceInfo = new FrmPriceInfo(0, "", "");
                priceInfo.Show(this.PagePriceInfo);
                priceInfo.Dock            = DockStyle.Fill;
                priceInfo.TopLevel        = false;
                priceInfo.FormBorderStyle = FormBorderStyle.None;

                this.dockPanelInfo.Text    = "物料其他信息";
                this.dockPanelInfo.TabText = this.dockPanelInfo.Text;
                this.PagePriceInfo.Controls.Add(priceInfo);

                //if (!FrmMainDAO.QueryUserButtonPower(this.Name, this.Text, btnStnList, false))
                //{
                //    PageStnInfo.Enabled = false;
                //}
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + tsmiCtjzsj.Text, ex);
            }
        }
Esempio n. 7
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmPBDesignBom_PS_Load(object sender, EventArgs e)
        {
            try
            {
                //searchCodeFileName.Properties.DataSource = commonDAO.QueryPartsCode(false);
                ControlCommonInit ctlInit = new ControlCommonInit();
                ctlInit.SearchLookUpEdit_PartsCode(searchCodeFileName, false, "CodeFileName", "CodeFileName");

                lookUpCatgName.Properties.DataSource = commonDAO.QueryPartNoCatg(true);
                lookUpCatgName.ItemIndex             = 0;
                lookUpBrand.Properties.DataSource    = commonDAO.QueryBrandCatg(true);
                lookUpBrand.ItemIndex = 0;

                btnEditAutoSalesOrderNo.Focus();
                btnEditAutoSalesOrderNo.SelectAll();
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
            }
        }
Esempio n. 8
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmWarehouseNowInfo_Bom_Load(object sender, EventArgs e)
        {
            try
            {
                ControlCommonInit ctlInit = new ControlCommonInit();
                ctlInit.SearchLookUpEdit_PartsCode(searchCodeFileName, false, "CodeFileName", "CodeFileName");
                ctlInit.SearchLookUpEdit_RepertoryLocationInfo(SearchLocationId, true);
                SearchLocationId.EditValue = 0;

                //searchCodeFileName.Properties.DataSource = commonDAO.QueryPartsCode(false);
                lookUpRepertoryId.Properties.DataSource = commonDAO.QueryRepertoryInfo(true);
                lookUpRepertoryId.ItemIndex             = 0;
                //SearchLocationId.Properties.DataSource = commonDAO.QueryRepertoryLocationInfo(true);
                //SearchLocationId.EditValue = 0;

                repLookUpCatgName.DataSource = commonDAO.QueryPartNoCatg(false);
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
            }
        }
Esempio n. 9
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmPartsCode_InputCondition_Load(object sender, EventArgs e)
        {
            try
            {
                if (!isVisibleBottomPanel)
                {
                    pnlBottom.Visible = false;
                }

                searchLookUpMaterial.Properties.DataSource = commonDAO.QueryMaterialSelectLib(true);
                searchLookUpMaterial.EditValue             = 0;
                lookUpCatgName.Properties.DataSource       = commonDAO.QueryPartNoCatg(true);
                lookUpCatgName.ItemIndex          = 0;
                lookUpBrand.Properties.DataSource = commonDAO.QueryBrandCatg(true);
                lookUpBrand.ItemIndex             = 0;
                lookUpUnit.Properties.DataSource  = commonDAO.QueryUnitCatg(true);
                lookUpUnit.ItemIndex = 0;
                lookUpMachiningLevel.Properties.DataSource = commonDAO.QueryLevelCatg(true);
                lookUpMachiningLevel.ItemIndex             = 0;
                lookUpFinish.Properties.DataSource         = commonDAO.QueryFinishCatg(true);
                lookUpFinish.ItemIndex = 0;

                checkIsPreferred.EditValue     = -1;
                checkIsLongPeriod.EditValue    = -1;
                checkIsPrecious.EditValue      = -1;
                checkIsPreprocessing.EditValue = -1;
                checkIsBuy.EditValue           = -1;

                DateTime nowDate = BaseSQL.GetServerDateTime();
                dateGetTimeBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DateIntervalDays);
                dateGetTimeEnd.DateTime   = nowDate.Date;
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
            }
        }
Esempio n. 10
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmPartsCode_Load(object sender, EventArgs e)
        {
            try
            {
                if (editForm == null)
                {
                    editForm = new FrmBaseEdit();
                    editForm.FormBorderStyle     = FormBorderStyle.None;
                    editForm.TopLevel            = false;
                    editForm.TableName           = "SW_PartsCode";
                    editForm.TableCaption        = "物料信息";
                    editForm.Sql                 = "select * from SW_PartsCode order by AutoId";
                    editForm.PrimaryKeyColumn    = "AutoId";
                    editForm.MasterDataSet       = dSPartsCode;
                    editForm.MasterBindingSource = bSPartsCode;
                    editForm.MasterEditPanel     = pnlEdit;
                    editForm.PrimaryKeyControl   = textCodeFileName;
                    editForm.BrowseXtraGridView  = gridViewPartsCode;
                    editForm.CheckControl       += CheckControl;
                    this.pnlToolBar.Controls.Add(editForm);
                    editForm.Dock = DockStyle.Fill;
                    editForm.Show();

                    searchLookUpMaterial.Properties.DataSource = commonDAO.QueryMaterialSelectLib(false);
                    lookUpCatgName.Properties.DataSource       = commonDAO.QueryPartNoCatg(false);
                    lookUpBrand.Properties.DataSource          = commonDAO.QueryBrandCatg(false);
                    lookUpFinish.Properties.DataSource         = commonDAO.QueryFinishCatg(false);
                    lookUpMachiningLevel.Properties.DataSource = commonDAO.QueryLevelCatg(false);
                    lookUpUnit.Properties.DataSource           = commonDAO.QueryUnitCatg(false);
                }
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + tsmiCtjzsj.Text, ex);
            }
        }
Esempio n. 11
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmPartsCode_MultiUpdate_Load(object sender, EventArgs e)
        {
            try
            {
                #region 查询条件

                //inputConditionForm = new FrmPartsCode_InputCondition();
                //inputConditionForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                //inputConditionForm.TopLevel = false;
                //inputConditionForm.Dock = DockStyle.Fill;
                //inputConditionForm.isVisibleBottomPanel = false;
                //xtraTabPageQuery.Controls.Add(inputConditionForm);
                //inputConditionForm.Show();

                searchLookUpMaterial.Properties.DataSource = commonDAO.QueryMaterialSelectLib(true);
                searchLookUpMaterial.EditValue             = 0;
                lookUpCatgName.Properties.DataSource       = commonDAO.QueryPartNoCatg(true);
                lookUpCatgName.ItemIndex          = 0;
                lookUpBrand.Properties.DataSource = commonDAO.QueryBrandCatg(true);
                lookUpBrand.ItemIndex             = 0;
                lookUpUnit.Properties.DataSource  = commonDAO.QueryUnitCatg(true);
                lookUpUnit.ItemIndex = 0;
                lookUpMachiningLevel.Properties.DataSource = commonDAO.QueryLevelCatg(true);
                lookUpMachiningLevel.ItemIndex             = 0;
                lookUpFinish.Properties.DataSource         = commonDAO.QueryFinishCatg(true);
                lookUpFinish.ItemIndex = 0;

                checkIsPreferred.EditValue     = -1;
                checkIsLongPeriod.EditValue    = -1;
                checkIsPrecious.EditValue      = -1;
                checkIsPreprocessing.EditValue = -1;
                checkIsBuy.EditValue           = -1;

                DateTime nowDate = BaseSQL.GetServerDateTime();
                dateGetTimeBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DateIntervalDays);
                dateGetTimeEnd.DateTime   = nowDate.Date;

                #endregion

                #region 批量修改

                searchLookUpMaterialUpdate.Properties.DataSource = commonDAO.QueryMaterialSelectLib(false);
                lookUpCatgNameUpdate.Properties.DataSource       = commonDAO.QueryPartNoCatg(false);
                lookUpBrandUpdate.Properties.DataSource          = commonDAO.QueryBrandCatg(false);
                lookUpUnitUpdate.Properties.DataSource           = commonDAO.QueryUnitCatg(false);
                lookUpMachiningLevelUpdate.Properties.DataSource = commonDAO.QueryLevelCatg(false);
                lookUpFinishUpdate.Properties.DataSource         = commonDAO.QueryFinishCatg(false);

                DataTable partsCodeColumnTable = new DataTable("partsCodeColumnTable");
                partsCodeColumnTable.Columns.Add("ColumnFieldName", Type.GetType("System.String"));
                partsCodeColumnTable.Columns.Add("ColumnCaptionName", Type.GetType("System.String"));

                DataRow newRow;

                foreach (DataColumn column in partsCodeTable.Columns)
                {
                    switch (column.ColumnName)
                    {
                    case "AutoId":
                    case "CodeNo":
                    case "CodeFileName":
                    case "CodeName":
                    case "FilePath":

                        continue;

                    default:
                        newRow = partsCodeColumnTable.NewRow();
                        newRow["ColumnFieldName"]   = column.ColumnName;
                        newRow["ColumnCaptionName"] = column.Caption;
                        partsCodeColumnTable.Rows.Add(newRow);
                        break;
                    }
                }

                lookUpColumnInfo.Properties.DataSource = partsCodeColumnTable;
                lookUpColumnInfo.ItemIndex             = -1;

                #endregion

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