예제 #1
0
        public static bool UpdateFilter(Common.SmsParser smsParser, Common.ParserFormula parserFormula)
        {
            Business.SmsParser     smsParserController     = new Business.SmsParser();
            Business.ParserFormula parserFormulaController = new Business.ParserFormula();

            smsParserController.BeginTransaction();
            try
            {
                if (!smsParserController.UpdateFilter(smsParser))
                {
                    throw new Exception(Language.GetString("ErrorRecord"));
                }

                parserFormula.SmsParserGuid = smsParser.SmsParserGuid;
                if (!parserFormulaController.InsertFilterOption(parserFormula))
                {
                    throw new Exception(Language.GetString("ErrorRecord"));
                }

                smsParserController.CommitTransaction();
                return(true);
            }
            catch (Exception ex)
            {
                smsParserController.RollbackTransaction();
                throw ex;
            }
        }
예제 #2
0
 public static DataTable GetParserFormulas(Guid smsParserGuid)
 {
     Business.ParserFormula parserFormulaController = new Business.ParserFormula();
     return(parserFormulaController.GetParserFormulas(smsParserGuid));
 }