예제 #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);
            }
        }
예제 #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);
            }
        }
예제 #3
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);
            }
        }
예제 #4
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);
            }
        }
예제 #5
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);
            }
        }
예제 #6
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);
            }
        }