Example #1
0
        protected void cmdResolve_ServerClick(object sender, System.EventArgs e)
        {
            ArrayList array = this.gridHelper.GetCheckedRows();

            if (array.Count > 0)
            {
                ArrayList systemErrors = new ArrayList(array.Count);

                foreach (UltraGridRow row in array)
                {
                    object obj = this.GetEditObject(row);

                    if (obj != null)
                    {
                        ((SystemError)obj).IsResolved  = FormatHelper.BooleanToString(true);
                        ((SystemError)obj).ResolveDate = FormatHelper.TODateInt(DateTime.Now);
                        ((SystemError)obj).ResolveTime = FormatHelper.TOTimeInt(DateTime.Now);
                        ((SystemError)obj).ResolveUser = this.GetUserCode();
                        systemErrors.Add(obj);
                    }
                }

                if (_facade == null)
                {
                    _facade = new SystemSettingFacadeFactory(base.DataProvider).Create();
                }
                this._facade.UpdateSystemError((SystemError[])systemErrors.ToArray(typeof(SystemError)));

                this.gridHelper.RequestData();
                this.buttonHelper.PageActionStatusHandle(PageActionType.Save);
            }
        }
Example #2
0
        protected override object GetEditObject()
        {
            //this.ValidateInput();
            if (_facade == null)
            {
                _facade = new SystemSettingFacade(base.DataProvider);
            }
            BenQGuru.eMES.Domain.BaseSetting.Parameter parameter = this._facade.CreateNewParameter();

            parameter.ParameterCode        = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtParameterCodeEdit.Text, 40));
            parameter.ParameterDescription = FormatHelper.CleanString(this.txtParameterDescriptionEdit.Text, 40);
            parameter.IsActive             = FormatHelper.BooleanToString(this.chbIsActiveEdit.Checked);
            parameter.IsSystem             = FormatHelper.BooleanToString(this.chbIsSystemEdit.Checked);
            parameter.ParameterGroupCode   = this.drpParameterGroupCodeEdit.SelectedValue;
            parameter.ParameterSequence    = FormatHelper.CleanString(this.txtParameterSeq.Text, 40);                   //参数顺序
            if (this.drpParameterGroupCodeEdit.SelectedValue == "")
            {
                parameter.ParameterValue = txtParameterCodeEdit.Text.Trim();
            }
            else
            {
                parameter.ParameterValue = this.drpParamterValueEdit.SelectedValue;
            }

            parameter.ParameterAlias      = FormatHelper.CleanString(this.txtParameterAliasEdit.Text, 40);
            parameter.MaintainUser        = this.GetUserCode();
            parameter.ParentParameterCode = this.drpParentParameter.SelectedValue;

            return(parameter);
        }
Example #3
0
 protected override void UpdateDomainObject(object domainObject)
 {
     if (_facade == null)
     {
         _facade = new SystemSettingFacade(base.DataProvider);
     }
     this._facade.UpdateParameter((BenQGuru.eMES.Domain.BaseSetting.Parameter)domainObject);
 }
Example #4
0
 private ITreeObjectNode LoadMenuTree()
 {
     if (_facade == null)
     {
         _facade = new SystemSettingFacadeFactory(base.DataProvider).Create();
     }
     return(this._facade.BuildMenuTree());
 }
Example #5
0
 protected override int GetRowCount()
 {
     if (_facade == null)
     {
         _facade = new SystemSettingFacadeFactory(base.DataProvider).Create();
     }
     return(this._facade.GetSubMenusByMenuCodeCount(FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtMenuCodeQuery.Text))));
 }
 protected override void UpdateDomainObject(object domainObject)
 {
     if (_facade == null)
     {
         _facade = new SystemSettingFacadeFactory(base.DataProvider).CreateSystemSettingFacade();
     }
     this._facade.UpdateFunctionGroup((FunctionGroup)domainObject);
 }
 protected override void DeleteDomainObjects(ArrayList domainObjects)
 {
     if (_facade == null)
     {
         _facade = new SystemSettingFacadeFactory(base.DataProvider).CreateSystemSettingFacade();
     }
     this._facade.DeleteFunctionGroup((FunctionGroup[])domainObjects.ToArray(typeof(FunctionGroup)));
 }
Example #8
0
 protected override void UpdateDomainObject(object domainObject)
 {
     if (_facade == null)
     {
         _facade = new SystemSettingFacade(base.DataProvider);
     }
     this._facade.UpdateParameterGroup((ParameterGroup)domainObject);
 }
Example #9
0
 protected override void AddDomainObject(object domainObject)
 {
     if (_facade == null)
     {
         _facade = new SystemSettingFacadeFactory(base.DataProvider).Create();
     }
     this._facade.AddMenu((BenQGuru.eMES.Domain.BaseSetting.Menu)domainObject);
 }
Example #10
0
 protected override void DeleteDomainObjects(ArrayList domainObjects)
 {
     if (_facade == null)
     {
         _facade = new SystemSettingFacade(base.DataProvider);
     }
     this._facade.DeleteParameterGroup((ParameterGroup[])domainObjects.ToArray(typeof(ParameterGroup)));
 }
Example #11
0
 protected override void DeleteDomainObjects(ArrayList domainObjects)
 {
     if (_facade == null)
     {
         _facade = new SystemSettingFacade(base.DataProvider);
     }
     this._facade.DeleteParameter((BenQGuru.eMES.Domain.BaseSetting.Parameter[])domainObjects.ToArray(typeof(BenQGuru.eMES.Domain.BaseSetting.Parameter)));
 }
Example #12
0
 protected override void DeleteDomainObjects(ArrayList domainObjects)
 {
     if (_facade == null)
     {
         _facade = new SystemSettingFacadeFactory(base.DataProvider).Create();
     }
     this._facade.DeleteMenu((BenQGuru.eMES.Domain.BaseSetting.Menu[])domainObjects.ToArray(typeof(BenQGuru.eMES.Domain.BaseSetting.Menu)));
 }
Example #13
0
 protected override object[] LoadDataSource(int inclusive, int exclusive)
 {
     if (_facade == null)
     {
         _facade = new SystemSettingFacadeFactory(base.DataProvider).Create();
     }
     return(this._facade.GetSubMenusByMenuCode(FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtMenuCodeQuery.Text)),
                                               inclusive, exclusive));
 }
Example #14
0
 protected override int GetRowCount()
 {
     if (_facade == null)
     {
         _facade = new SystemSettingFacade(base.DataProvider);
     }
     return(this._facade.QueryParameterGroupCount(
                FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtParameterGroupCodeQuery.Text)),
                FormatHelper.CleanString(this.txtParameterGroupTypeQuery.Text)));
 }
Example #15
0
        protected override void UpdateDomainObject(object domainObject)
        {
            this.CheckParentMenu(this.drpParentMenuCodeEdit.SelectedValue);

            if (_facade == null)
            {
                _facade = new SystemSettingFacadeFactory(base.DataProvider).Create();
            }
            this._facade.UpdateMenu((BenQGuru.eMES.Domain.BaseSetting.Menu)domainObject);
        }
Example #16
0
 protected override object[] LoadDataSource(int inclusive, int exclusive)
 {
     if (_facade == null)
     {
         _facade = new SystemSettingFacade(base.DataProvider);
     }
     return(this._facade.QueryParameterGroup(
                FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtParameterGroupCodeQuery.Text)),
                FormatHelper.CleanString(this.txtParameterGroupTypeQuery.Text),
                inclusive, exclusive));
 }
Example #17
0
        private void InitDepartmentList()
        {
            this.drpDepartmentEdit.Items.Clear();
            BenQGuru.eMES.BaseSetting.SystemSettingFacade sysFacade = new BenQGuru.eMES.BaseSetting.SystemSettingFacade(this.DataProvider);
            ITreeObjectNode   node    = sysFacade.BuildParameterTree("DEPARTMENT");
            TreeObjectNodeSet nodeSet = node.GetSubLevelChildrenNodes();

            for (int i = 0; i < nodeSet.Count; i++)
            {
                AppendParentParameter((ITreeObjectNode)nodeSet[i], "");
            }
        }
Example #18
0
 protected override int GetRowCount()
 {
     if (_facade == null)
     {
         _facade = new SystemSettingFacade(base.DataProvider);
     }
     return(this._facade.QueryParameterCount(
                FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtParameterCodeQuery.Text)),
                this.drpParameterGroupCodeQuery.SelectedValue,
                this.txtParentParameterQuery.Text.ToUpper(),
                !this.chkQueryParentParameterAll.Checked));
 }
Example #19
0
 protected override object[] LoadDataSource(int inclusive, int exclusive)
 {
     if (_facade == null)
     {
         _facade = new SystemSettingFacade(base.DataProvider);
     }
     return(this._facade.QueryParameter(
                FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtParameterCodeQuery.Text)),
                this.drpParameterGroupCodeQuery.SelectedValue,
                this.txtParentParameterQuery.Text.ToUpper(),
                !this.chkQueryParentParameterAll.Checked,
                inclusive, exclusive));
 }
Example #20
0
 protected override int GetRowCount()
 {
     if (_facade == null)
     {
         _facade = new SystemSettingFacadeFactory(base.DataProvider).Create();
     }
     return(this._facade.QuerySystemErrorCount(
                FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtSystemErrorCodeQuery.Text)),
                this.drpIsResovedQuery.SelectedValue,
                FormatHelper.TODateInt(this.dateSendBeginDateEdit.Text),
                FormatHelper.TOTimeInt(this.timeSendBeginTimeEdit.Text),
                this.dateSendEndDateEdit.Text == "" ? 99999999 : FormatHelper.TODateInt(this.dateSendEndDateEdit.Text),
                this.timeSendEndTimeEdit.Text == "" ? 999999 : FormatHelper.TOTimeInt(this.timeSendEndTimeEdit.Text)));
 }
Example #21
0
        protected override object GetEditObject(GridRecord row)
        {
            if (_facade == null)
            {
                _facade = new SystemSettingFacade(base.DataProvider);
            }
            object obj = _facade.GetParameterGroup(row.Items.FindItemByKey("ParameterGroupCode").Text.ToString());

            if (obj != null)
            {
                return((ParameterGroup)obj);
            }

            return(null);
        }
Example #22
0
        protected override object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row)
        {
            if (_facade == null)
            {
                _facade = new SystemSettingFacadeFactory(base.DataProvider).Create();
            }
            object obj = _facade.GetSystemError(row.Cells[1].Text.ToString());

            if (obj != null)
            {
                return((SystemError)obj);
            }

            return(null);
        }
Example #23
0
        protected override object GetEditObject(GridRecord row)
        {
            if (_facade == null)
            {
                _facade = new SystemSettingFacadeFactory(base.DataProvider).CreateSystemSettingFacade();
            }
            object obj = _facade.GetFunctionGroup(row.Items.FindItemByKey("FunctionGroupCode").Text.ToString());

            if (obj != null)
            {
                return((FunctionGroup)obj);
            }

            return(null);
        }
Example #24
0
        protected void drpModuleCodeEdit_Load(object sender, System.EventArgs e)
        {
            if (!IsPostBack)
            {
                DropDownListBuilder builder = new DropDownListBuilder(this.drpModuleCodeEdit);
                if (_facade == null)
                {
                    _facade = new SystemSettingFacadeFactory(base.DataProvider).Create();
                }
                builder.HandleGetObjectList = new GetObjectListDelegate(this._facade.GetAllModules);

                builder.Build("ModuleCode", "ModuleCode");
                this.drpModuleCodeEdit.Items.Insert(0, "");
            }
        }
Example #25
0
        protected override object GetEditObject(GridRecord row)
        {
            if (_facade == null)
            {
                _facade = new SystemSettingFacadeFactory(base.DataProvider).Create();
            }
            object obj = _facade.GetMenu(row.Items.FindItemByKey("MenuCode").Text.ToString());

            if (obj != null)
            {
                return((BenQGuru.eMES.Domain.BaseSetting.Menu)obj);
            }

            return(null);
        }
Example #26
0
        protected string GetStatusDesc(string status)
        {
            if (sysFacade == null)
            {
                sysFacade = new SystemSettingFacade(this.DataProvider);
            }

            object obj = sysFacade.GetParameter(status, "EQPSTATUS");

            if (obj != null)
            {
                return((obj as Domain.BaseSetting.Parameter).ParameterDescription);
            }

            return(" ");
        }
Example #27
0
        protected override object GetEditObject()
        {
            //this.ValidateInput();

            if (_facade == null)
            {
                _facade = new SystemSettingFacadeFactory(base.DataProvider).CreateSystemSettingFacade();
            }
            FunctionGroup functionGroup = this._facade.CreateNewFunctionGroup();

            functionGroup.FunctionGroupDescription = FormatHelper.CleanString(this.txtFunctionGroupDescriptionEdit.Text, 100);
            functionGroup.FunctionGroupCode        = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtFunctionGroupCodeEdit.Text, 40));
            functionGroup.MaintainUser             = this.GetUserCode();

            return(functionGroup);
        }
Example #28
0
        protected override object GetEditObject()
        {
            //this.ValidateInput();

            if (_facade == null)
            {
                _facade = new SystemSettingFacade(base.DataProvider);
            }
            ParameterGroup parameterGroup = this._facade.CreateNewParameterGroup();

            parameterGroup.ParameterGroupType        = FormatHelper.CleanString(this.txtParameterGroupTypeEdit.Text, 40);
            parameterGroup.ParameterGroupDescription = FormatHelper.CleanString(this.txtParameterGroupDescriptionEdit.Text, 100);
            parameterGroup.IsSystem           = FormatHelper.BooleanToString(this.chbIsSystemGroupEdit.Checked);
            parameterGroup.ParameterGroupCode = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtParameterGroupCodeEdit.Text, 40));
            parameterGroup.MaintainUser       = this.GetUserCode();

            return(parameterGroup);
        }
Example #29
0
        protected override object GetEditObject()
        {
            //this.ValidateInput();

            if (_facade == null)
            {
                _facade = new SystemSettingFacadeFactory(base.DataProvider).Create();
            }
            object obj = (SystemError)_facade.GetSystemError(this.txtSystemErrorCodeEdit.Text);

            if (obj != null)
            {
                ((SystemError)obj).ResolveNotes = FormatHelper.CleanString(this.txtResolveNotesEdit.Text, 100);
                ((SystemError)obj).MaintainUser = this.GetUserCode();
            }

            return(obj);
        }
Example #30
0
        protected override object GetEditObject()
        {
            if (_facade == null)
            {
                _facade = new SystemSettingFacadeFactory(base.DataProvider).Create();
            }
            BenQGuru.eMES.Domain.BaseSetting.Menu menu = this._facade.CreateNewMenu();

            menu.MenuCode        = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtMenuCodeEdit.Text, 40));
            menu.ModuleCode      = this.drpModuleCodeEdit.SelectedValue;
            menu.MenuSequence    = System.Decimal.Parse(this.txtMenuSequenceEdit.Text);
            menu.MenuType        = this.drpMenuTypeEdit.SelectedValue;
            menu.ParentMenuCode  = this.drpParentMenuCodeEdit.SelectedValue;
            menu.MenuDescription = FormatHelper.CleanString(this.txtMenuDescriptionEdit.Text, 100);
            menu.Visibility      = this.drpIsRestrain.SelectedValue;
            menu.MaintainUser    = this.GetUserCode();

            return(menu);
        }