protected override void UpdateDomainObject(object domainObject)
 {
     if (_facade == null)
     {
         _facade = new TSModelFacadeFactory(base.DataProvider).CreateTSModelFacade();
     }
     this._facade.UpdateErrorCauseGroup((ErrorCauseGroup)domainObject);
 }
Example #2
0
 protected override void AddDomainObject(object domainObject)
 {
     if (_facade == null)
     {
         _facade = new TSModelFacadeFactory(base.DataProvider).CreateTSModelFacade();
     }
     this._facade.AddErrorCause((ErrorCause)domainObject);
 }
 protected override void DeleteDomainObjects(ArrayList domainObjects)
 {
     if (_facade == null)
     {
         _facade = new TSModelFacadeFactory(base.DataProvider).CreateTSModelFacade();
     }
     this._facade.DeleteErrorCauseGroup((ErrorCauseGroup[])domainObjects.ToArray(typeof(ErrorCauseGroup)));
 }
 protected override void UpdateDomainObject(object domainObject)
 {
     if (_facade == null)
     {
         _facade = new TSModelFacadeFactory(base.DataProvider).CreateTSModelFacade();
     }
     this._facade.UpdateTSSmartConfig((TSSmartConfig)domainObject);
 }
 protected override void DeleteDomainObjects(ArrayList domainObjects)
 {
     if (_facade == null)
     {
         _facade = new TSModelFacadeFactory(base.DataProvider).CreateTSModelFacade();
     }
     this._facade.DeleteTSSmartConfig((TSSmartConfig[])domainObjects.ToArray(typeof(TSSmartConfig)));
 }
 protected override int GetRowCount()
 {
     if (_facade == null)
     {
         _facade = new TSModelFacadeFactory(base.DataProvider).CreateTSModelFacade();
     }
     return(this._facade.QueryErrorCauseGroupCount(
                FormatHelper.CleanString(this.txtErrorCauseGroupQuery.Text)));
 }
 protected override object[] LoadDataSource(int inclusive, int exclusive)
 {
     if (_facade == null)
     {
         _facade = new TSModelFacadeFactory(base.DataProvider).CreateTSModelFacade();
     }
     return(this._facade.QueryErrorCauseGroup(
                FormatHelper.CleanString(FormatHelper.PKCapitalFormat(this.txtErrorCauseGroupQuery.Text)),
                inclusive, exclusive));
 }
 protected override int GetRowCount()
 {
     if (_facade == null)
     {
         _facade = new TSModelFacadeFactory(base.DataProvider).CreateTSModelFacade();
     }
     return(this._facade.QueryTSSmartConfigCount(
                FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtErrorCodeQuery.Text))
                ));
 }
Example #9
0
        protected override void DeleteDomainObjects(ArrayList domainObjects)
        {
            if (_facade == null)
            {
                _facade = new TSModelFacadeFactory(base.DataProvider).CreateTSModelFacade();
            }

            Duty[] dutys = (Duty[])domainObjects.ToArray(typeof(Duty));
            if (_facade.CheckDutyCodeIsUsed(dutys))
            {
                BenQGuru.eMES.Common.ExceptionManager.Raise(this.GetType(), "$Error_DutyCode_Has_Used");
            }
            this._facade.DeleteDuty(dutys);
        }
        protected override object GetEditObject()
        {
//            this.ValidateInput();
            if (_facade == null)
            {
                _facade = new TSModelFacadeFactory(base.DataProvider).CreateTSModelFacade();
            }
            ErrorCauseGroup ErrorCauseGroup = this._facade.CreateNewErrorCauseGroup();

            ErrorCauseGroup.ErrorCauseGroupCode        = FormatHelper.CleanString(FormatHelper.PKCapitalFormat(this.txtErrorCauseGroupEdit.Text), 40);
            ErrorCauseGroup.ErrorCauseGroupDescription = FormatHelper.CleanString(this.txtErrorCauseGroupDescriptionEdit.Text, 100);
            ErrorCauseGroup.MaintainUser = this.GetUserCode();

            return(ErrorCauseGroup);
        }
Example #11
0
        protected override object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row)
        {
            if (_facade == null)
            {
                _facade = new TSModelFacadeFactory(base.DataProvider).CreateTSModelFacade();
            }
            object obj = _facade.GetTSSmartConfig(decimal.Parse(row.Cells.FromKey("Sequence").Text.ToString()));

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

            return(null);
        }
Example #12
0
        protected override object GetEditObject()
        {
//            this.ValidateInput();
            if (_facade == null)
            {
                _facade = new TSModelFacadeFactory(base.DataProvider).CreateTSModelFacade();
            }
            Duty duty = this._facade.CreateNewDuty();

            duty.DutyCode        = FormatHelper.CleanString(FormatHelper.PKCapitalFormat(this.txtDutyCodeEdit.Text), 40);
            duty.DutyDescription = FormatHelper.CleanString(this.txtDutyDescriptionEdit.Text, 100);
            duty.MaintainUser    = this.GetUserCode();

            return(duty);
        }
Example #13
0
        protected override object GetEditObject()
        {
//            this.ValidateInput();
            if (_facade == null)
            {
                _facade = new TSModelFacadeFactory(base.DataProvider).CreateTSModelFacade();
            }
            Solution solution = this._facade.CreateNewSolution();

            solution.SolutionCode        = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtSolutionCodeEdit.Text, 40));
            solution.SolutionDescription = FormatHelper.CleanString(this.txtSolutionDescriptionEdit.Text, 100);
            solution.SolutionImprove     = FormatHelper.CleanString(this.txtSolutionImproveEdit.Text, 100);
            solution.MaintainUser        = this.GetUserCode();

            return(solution);
        }
Example #14
0
        protected override bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new LengthCheck(this.lblNGCodeEdit, this.txtErrorCodeEdit, 40, true));
            manager.Add(new DecimalCheck(this.lblSmartDateRange, this.txtSmartDateRange, 0, decimal.MaxValue, true));
            manager.Add(new DecimalCheck(this.lblShowItemCount, this.txtShowItemCount, 0, decimal.MaxValue, true));

            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, this.languageComponent1);
                return(false);
            }

            if (_facade == null)
            {
                _facade = new TSModelFacadeFactory(base.DataProvider).CreateTSModelFacade();
            }
            if (_facade.GetErrorCode(this.txtErrorCodeEdit.Text.Trim().ToUpper()) == null)
            {
                throw new Exception("$ErrorCode_Not_Exist");
            }
            object[] objsTmp = _facade.QueryTSSmartConfig(this.txtErrorCodeEdit.Text.Trim().ToUpper(), 1, 2);
            bool     bExist  = false;

            if (objsTmp != null && objsTmp.Length >= 2)
            {
                bExist = true;
            }
            else if (objsTmp != null && objsTmp.Length == 1)
            {
                if (Convert.ToInt32(((TSSmartConfig)objsTmp[0]).Sequence) != Convert.ToInt32(this.txtSequence.Text))
                {
                    bExist = true;
                }
            }
            if (bExist == true)
            {
                throw new Exception("$ErrorCode_SmartTS_Already_Exist");
            }

            return(true);
        }
        protected override object GetEditObject(GridRecord row)
        {
            if (_facade == null)
            {
                _facade = new TSModelFacadeFactory(base.DataProvider).CreateTSModelFacade();
            }
            string strCode = string.Empty;
            object objCode = row.Items.FindItemByKey("ErrorCauseGroup").Value;

            if (objCode != null)
            {
                strCode = objCode.ToString();
            }
            object obj = _facade.GetErrorCauseGroup(strCode);

            if (obj != null)
            {
                return((ErrorCauseGroup)obj);
            }
            return(null);
        }
Example #16
0
        protected override object GetEditObject()
        {
            if (_facade == null)
            {
                _facade = new TSModelFacadeFactory(base.DataProvider).CreateTSModelFacade();
            }
            TSSmartConfig smartCfg = this._facade.CreateNewTSSmartConfig();

            if (this.txtSequence.Text != "")
            {
                smartCfg.Sequence = decimal.Parse(this.txtSequence.Text);
            }
            smartCfg.ErrorCode     = FormatHelper.CleanString(FormatHelper.PKCapitalFormat(this.txtErrorCodeEdit.Text), 40);
            smartCfg.Enabled       = FormatHelper.BooleanToString(this.chkEnabledSmart.Checked);
            smartCfg.SortBy        = this.drpSortBy.SelectedValue;
            smartCfg.DateRange     = decimal.Parse(this.txtSmartDateRange.Text);
            smartCfg.DateRangeType = this.drpSmartDateRangeType.SelectedValue;
            smartCfg.ShowItemCount = decimal.Parse(this.txtShowItemCount.Text);
            smartCfg.MaintainUser  = this.GetUserCode();

            return(smartCfg);
        }