示例#1
0
 private object[] GeINVReceiveTypes()
 {
     BenQGuru.eMES.BaseSetting.SystemSettingFacade ssfacade = new BenQGuru.eMES.BaseSetting.SystemSettingFacade(base.DataProvider);
     object[] objs = ssfacade.GetParametersByParameterGroup("INVRECEIVE");
     ssfacade = null;
     return(objs);
 }
示例#2
0
        private void FFeederMaintain_Load(object sender, System.EventArgs e)
        {
            if (tableSource == null)
            {
                tableSource = new DataTable();
                tableSource.Columns.Add("FeederCode");
                tableSource.Columns.Add("MaxCount", typeof(int));
                tableSource.Columns.Add("UsedCount", typeof(int));
                tableSource.Columns.Add("OldStatus");
                tableSource.Columns.Add("MaintainType");
                tableSource.Columns.Add("ReturnReason");
                tableSource.Columns.Add("AnalyseReason");
                tableSource.Columns.Add("OperationMessage");
                tableSource.Columns.Add("Status");
                tableSource.Columns.Add("MaintainUser");
                tableSource.Columns.Add("MaintainDate");
                tableSource.Columns.Add("MaintainTime");
            }
            gridList.DataSource = tableSource;
            gridList.DisplayLayout.Bands[0].Columns["UsedCount"].Hidden = true;
            SetControlEnabled();
            this.txtFeederNo.TextFocus(false, true);
            smtFacade = new SMTFacade(this.DataProvider);

            UserControl.UIStyleBuilder.FormUI(this);
            UserControl.UIStyleBuilder.GridUI(gridList);
            gridList.DisplayLayout.Bands[0].Columns["MaxCount"].Format = "#,#";
            gridList.DisplayLayout.Bands[0].Columns["MaxCount"].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right;
            gridList.DisplayLayout.Bands[0].Columns["UsedCount"].Format = "#,#";
            gridList.DisplayLayout.Bands[0].Columns["UsedCount"].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right;

            BenQGuru.eMES.BaseSetting.SystemSettingFacade sysFacade = new BenQGuru.eMES.BaseSetting.SystemSettingFacade(this.DataProvider);
            analyseReasonList = sysFacade.GetParametersByParameterGroup("FEEDERANALYSEREASON");
            if (analyseReasonList != null)
            {
                for (int i = 0; i < analyseReasonList.Length; i++)
                {
                    BenQGuru.eMES.Domain.BaseSetting.Parameter parameter = (BenQGuru.eMES.Domain.BaseSetting.Parameter)analyseReasonList[i];
                    this.cboAnalyseReason.Items.Add(parameter.ParameterAlias);
                }
            }
            operationMessageList = sysFacade.GetParametersByParameterGroup("FEEDERSOLUTION");
            if (operationMessageList != null)
            {
                for (int i = 0; i < operationMessageList.Length; i++)
                {
                    BenQGuru.eMES.Domain.BaseSetting.Parameter parameter = (BenQGuru.eMES.Domain.BaseSetting.Parameter)operationMessageList[i];
                    this.cboOperationMessage.Items.Add(parameter.ParameterAlias);
                }
            }
            //this.InitPageLanguage();
            //this.InitGridLanguage(gridList);
        }
        protected void Page_Load(object sender, System.EventArgs e)
        {
            if (this.IsPostBack == false)
            {
                // 初始化页面语言
                this.InitPageLanguage(this.languageComponent1, false);
                string strFileName = this.designView.UploadFileName;
                strFileName             = strFileName.Substring(strFileName.LastIndexOf("\\") + 1);
                this.txtReportFile.Text = strFileName;
                this.txtReportName.Text = this.designView.DesignMain.ReportName;

                ////Modified by allen on 20081104 for change to FunctionGroup
                //BenQGuru.eMES.BaseSetting.UserFacade userFacade = new BenQGuru.eMES.BaseSetting.UserFacade(this.DataProvider);
                //object[] objGroup = userFacade.GetAllUserGroup();
                BenQGuru.eMES.BaseSetting.SystemSettingFacade systemSetFacade = new BenQGuru.eMES.BaseSetting.SystemSettingFacade(this.DataProvider);
                object[] objGroup = systemSetFacade.GetAllFunctionGroup();
                ////End Modified by allen on 20081104 for change to FunctionGroup

                ReportViewFacade        rptFacade   = new ReportViewFacade(this.DataProvider);
                RptViewReportSecurity[] rptSecurity = null;
                if (this.designView.DesignMain.ReportID != "")
                {
                    rptSecurity = rptFacade.GetRptViewReportSecurityByReportId(this.designView.DesignMain.ReportID);
                }

                ////Modified by allen on 20081104 for change to FunctionGroup
                //this.rptSecuritySelect.InitData(objGroup, rptSecurity);
                this.rptSecuritySelect.InitFunctionGroupData(objGroup, rptSecurity);
                ////End Modified by allen on 20081104 for change to FunctionGroup

                object[] objTmps = rptFacade.GetRptViewEntryFolder();
                if (objTmps != null)
                {
                    RptViewEntry[] entityList = new RptViewEntry[objTmps.Length];
                    objTmps.CopyTo(entityList, 0);
                    InitReportFolderList(entityList);
                }
                RptViewDesignMain rptMain = this.designView.DesignMain;
                if (rptMain != null && rptMain.ParentReportFolder != "")
                {
                    this.drpReportFolder.SelectedValue = rptMain.ParentReportFolder;
                }

                if (this.drpReportFolder.Items.Count == 0)
                {
                    this.cmdPublish.Disabled = true;
                    this.cmdPublish.Attributes.Add("disabled", "disabled");
                }
            }
        }
示例#4
0
        private void ConvertStatusText()
        {
            if (tableSource.Rows.Count == 0)
            {
                return;
            }
            if (htStatus == null)
            {
                htStatus = new Hashtable();
                BenQGuru.eMES.BaseSetting.SystemSettingFacade sysSetting = new BenQGuru.eMES.BaseSetting.SystemSettingFacade(this.DataProvider);
                object[] objs = sysSetting.GetParametersByParameterGroup("FEEDERSTATUS");
                if (objs != null)
                {
                    for (int i = 0; i < objs.Length; i++)
                    {
                        BenQGuru.eMES.Domain.BaseSetting.Parameter param = (BenQGuru.eMES.Domain.BaseSetting.Parameter)objs[i];
                        htStatus.Add(param.ParameterCode, param.ParameterAlias);
                    }
                }
            }
            DataRow row = tableSource.Rows[tableSource.Rows.Count - 1];

            if (htStatus.ContainsKey(row["Status"].ToString()) == true)
            {
                row["Status"]    = htStatus[row["Status"].ToString()];
                row["OldStatus"] = htStatus[row["OldStatus"].ToString()];
            }
            if (this.rdoTakeCare.Checked == true)
            {
                row["MaintainType"] = this.rdoTakeCare.Text;
            }
            else if (this.rdoAdjust.Checked == true)
            {
                row["MaintainType"] = this.rdoAdjust.Text;
            }
            else if (this.rdoAnalyse.Checked == true)
            {
                row["MaintainType"] = this.rdoAnalyse.Text;
            }
            // 原因分析
            if (row["AnalyseReason"].ToString() != string.Empty)
            {
                row["AnalyseReason"] = ((BenQGuru.eMES.Domain.BaseSetting.Parameter) this.analyseReasonList[this.cboAnalyseReason.SelectedIndex]).ParameterAlias;
            }
            if (row["OperationMessage"].ToString() != string.Empty)
            {
                row["OperationMessage"] = ((BenQGuru.eMES.Domain.BaseSetting.Parameter) this.operationMessageList[this.cboOperationMessage.SelectedIndex]).ParameterAlias;
            }
        }
示例#5
0
        private void FInvReceive_Load(object sender, System.EventArgs e)
        {
            _infoForm = ApplicationRun.GetInfoForm();

            UserControl.UIStyleBuilder.FormUI(this);

            this.txtRecNo.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;

            #region 初始化Grid
            UserControl.UIStyleBuilder.GridUI(this.ultraGridContent);
            _tmpTable = new DataTable();
            _tmpTable.Columns.Clear();
            _tmpTable.Columns.Add("*", typeof(bool));
            _tmpTable.Columns.Add("MoCode", typeof(string));
            _tmpTable.Columns.Add("NO", typeof(string));
            _tmpTable.Columns.Add("SEQ", typeof(int));
            _tmpTable.Columns.Add("ModelCode", typeof(string));
            _tmpTable.Columns.Add("ItemCode", typeof(string));
            _tmpTable.Columns.Add("ItemDesc", typeof(string));
            _tmpTable.Columns.Add("PlayQty", typeof(string));
            _tmpTable.Columns.Add("ActQty", typeof(string));
            _tmpTable.Columns.Add("MOPlanQty", typeof(string));
            _tmpTable.Columns.Add("MOActQty", typeof(string));

            BindGrid();
            #endregion

            //入库单类型
            this.cbxType.ComboBoxData.Items.Clear();
            object[] types = new BenQGuru.eMES.BaseSetting.SystemSettingFacade(this.DataProvider).GetParametersByParameterGroup("INVRECEIVE");
            if (types != null && types.Length > 0)
            {
                foreach (object obj in types)
                {
                    BenQGuru.eMES.Domain.BaseSetting.Parameter param = obj as BenQGuru.eMES.Domain.BaseSetting.Parameter;
                    if (obj != null)
                    {
                        this.cbxType.ComboBoxData.Items.Add(param.ParameterCode);
                    }
                }
                if (this.cbxType.ComboBoxData.Items.Count > 0)
                {
                    this.cbxType.ComboBoxData.SelectedIndex = 0;
                }
            }
            //产品别列表
            BindModel(this.DataProvider, this.cbxModel);
        }
示例#6
0
        private void InitSecurityList(string strRptId)
        {
            ////Modified by allen on 20081104 for change to FunctionGroup
            //BenQGuru.eMES.BaseSetting.UserFacade userFacade = new BenQGuru.eMES.BaseSetting.UserFacade(this.DataProvider);
            //object[] objGroup = userFacade.GetAllUserGroup();
            BenQGuru.eMES.BaseSetting.SystemSettingFacade systemSetFacade = new BenQGuru.eMES.BaseSetting.SystemSettingFacade(this.DataProvider);
            object[] objGroup = systemSetFacade.GetAllFunctionGroup();

            ////End Modified by allen on 20081104 for change to FunctionGroup

            ReportViewFacade rptFacade = new ReportViewFacade(this.DataProvider);

            RptViewReportSecurity[] rptSecurity = rptFacade.GetRptViewReportSecurityByReportId(strRptId);

            ////Modified by allen on 20081104 for change to FunctionGroup
            //this.rptSecuritySelect.InitData(objGroup, rptSecurity);
            this.rptSecuritySelect.InitFunctionGroupData(objGroup, rptSecurity);
            ////End Modified by allen on 20081104 for change to FunctionGroup
        }
示例#7
0
        /// <summary>
        /// 判断导入的MO是否有效
        /// </summary>
        /// <param name="obj">导入的MO</param>
        /// <returns>如果有效,返回true,否则,返回false;返回false时,这个MO将不会被导入</returns>
        private bool MODownloadCheck(object obj)
        {
            MO mo = (MO)obj;

            //非空检查
            CheckMODomain(mo);

            if (sysSettingFacade == null)
            {
                sysSettingFacade = new BenQGuru.eMES.BaseSetting.SystemSettingFacade(base.DataProvider);
            }
            object[] parameters = sysSettingFacade.GetParametersByParameterGroup(MOType.GroupType);

            //add by crystal chu 2005/05/08
            if (parameters == null)
            {
                ExceptionManager.Raise(this.GetType().BaseType, "$Error_System_Error");
            }

            if (mo.MOPlanStartDate > mo.MOPlanEndDate)
            {
                // ExceptionManager.Raise(this.GetType().BaseType, "$Error_MOPlanEndDateBigThanMOPlanStartDate");
                mo.EAttribute6 += ";" + this.languageComponent1.GetString("$Error_MOPlanEndDateBigThanMOPlanStartDate");
            }

            bool isParamExist = false;

            foreach (BenQGuru.eMES.Domain.BaseSetting.Parameter parameter in parameters)
            {
                if (mo.MOType == parameter.ParameterCode)
                {
                    isParamExist = true;
                    break;
                }
            }

            if (!isParamExist)
            {
                //ExceptionManager.Raise(this.GetType().BaseType, "$Error_MOType_NotExisted");
                //modified by kathy @20130812 修正提示信息:工单类型不存在
                mo.EAttribute6 += ";" + this.languageComponent1.GetString("$Error_MOType_NotExisted");
            }

            // 检查 ItemCode
            BenQGuru.eMES.MOModel.ItemFacade itemFacade = new ItemFacade(base.DataProvider);
            object item = itemFacade.GetItem(FormatHelper.PKCapitalFormat(FormatHelper.CleanString(mo.ItemCode)), GlobalVariables.CurrentOrganizations.First().OrganizationID);

            if (item == null)
            {
                //ExceptionManager.Raise(this.GetType().BaseType, "$Error_ItemCode_NotExist");
                mo.EAttribute6 += ";" + this.languageComponent1.GetString("$Error_ItemCode_NotExist");
            }

            MOFacade moFacade  = new FacadeFactory(base.DataProvider).CreateMOFacade();
            object   isExistMO = moFacade.GetMO(FormatHelper.PKCapitalFormat(mo.MOCode));

            if (isExistMO != null)
            {
                //  ExceptionManager.Raise(this.GetType().BaseType, "$Error_MO_HasExisted", String.Format("[$MOCode='{0}']", mo.MOCode));
                mo.EAttribute6 += ";" + this.languageComponent1.GetString("$Error_MO_HasExisted");
            }

            return(true);
        }