示例#1
0
    private void Fill_GridRules_RulesView(decimal RuleGroupID)
    {
        string[]         retMessage      = new string[4];
        IList <RuleType> RulesGroupsList = null;

        try
        {
            if (Session["RulesSource_RulesView"] == null)
            {
                BRuleViewer RulesViewerBusiness = this.GetRuleViewerBusiness(RuleGroupID);
                RulesGroupsList = RulesViewerBusiness.GetAllRuleTypes();
                foreach (RuleType ruleGroupItem in RulesGroupsList)
                {
                    ruleGroupItem.Name = GetLocalResourceObject(ruleGroupItem.Name).ToString();
                }
                Session.Add("RulesSource_RulesView", RulesGroupsList);
            }
            this.GridRules_RulesView.DataSource = (IList <RuleType>)Session["RulesSource_RulesView"];
            this.GridRules_RulesView.DataBind();
        }
        catch (UIValidationExceptions ex)
        {
            retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIValidationExceptions, ex, retMessage);
            this.ErrorHiddenField_RulesView.Value = this.exceptionHandler.CreateErrorMessage(retMessage);
        }
        catch (UIBaseException ex)
        {
            retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIBaseException, ex, retMessage);
            this.ErrorHiddenField_RulesView.Value = this.exceptionHandler.CreateErrorMessage(retMessage);
        }
        catch (Exception ex)
        {
            retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.Exception, ex, retMessage);
            this.ErrorHiddenField_RulesView.Value = this.exceptionHandler.CreateErrorMessage(retMessage);
        }
    }
示例#2
0
 public void GetAllRuletypesTest()
 {
     businessRuleViwer.GetAllRuleTypes();
     Assert.Pass();
 }