Beispiel #1
0
 public static Common.SmsParser LoadSmsParser(Guid guid)
 {
     Business.SmsParser smsParserController = new Business.SmsParser();
     Common.SmsParser   smsParser           = new Common.SmsParser();
     smsParserController.Load(guid, smsParser);
     return(smsParser);
 }
Beispiel #2
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;
            }
        }
Beispiel #3
0
 public static bool ParseReceiveSms(Guid smsGuid, Guid numberGuid, string smsText, string mobile)
 {
     try
     {
         Business.SmsParser smsParserController = new Business.SmsParser();
         return(smsParserController.ParseReceiveSms(smsGuid, numberGuid, smsText, mobile));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #4
0
 public static bool InsertCompetition(Common.SmsParser smsParser, DataTable dtSmsParserOptions)
 {
     Business.SmsParser smsParserController = new Business.SmsParser();
     try
     {
         dtSmsParserOptions.Columns.Remove("Guid");
         return(smsParserController.InsertCompetition(smsParser, dtSmsParserOptions) != Guid.Empty ? true : false);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #5
0
 public static bool UpdateCompetition(Common.SmsParser smsParser, DataTable dtSmsParserOptions)
 {
     Business.SmsParser smsParserController = new Business.SmsParser();
     try
     {
         dtSmsParserOptions.Columns.Remove("Guid");
         return(smsParserController.UpdateCompetition(smsParser, dtSmsParserOptions));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #6
0
        //public static DataTable GetSmsParsersOfPrivateNumber(Guid userPrivateNumberGuid)
        //{
        //	Business.SmsParser smsParserController = new Business.SmsParser();
        //	return smsParserController.GetSmsParsersOfPrivateNumber(userPrivateNumberGuid);
        //}

        public static bool ActiveSmsParser(Guid smsParserGuid)
        {
            Business.SmsParser smsParserController = new Business.SmsParser();
            Common.SmsParser   smsParser           = new Common.SmsParser();
            try
            {
                if (!smsParserController.Load(smsParserGuid, smsParser))
                {
                    throw new Exception();
                }

                bool isActive = smsParser.IsActive ? false : true;
                return(smsParserController.ActiveSmsParser(smsParserGuid, isActive));
            }
            catch
            {
                return(false);
            }
        }
Beispiel #7
0
 public static bool IsDuplicateSmsParserKey(Guid parserGuid, Guid numberGuid, string key)
 {
     Business.SmsParser smsParserController = new Business.SmsParser();
     return(smsParserController.IsDuplicateSmsParserKey(parserGuid, numberGuid, key));
 }
Beispiel #8
0
 public static bool Delete(Guid guid)
 {
     Business.SmsParser smsParserController = new Business.SmsParser();
     return(smsParserController.Delete(guid));
 }
Beispiel #9
0
 public static DataTable GetPagedSmsParsers(Common.SmsParser smsParser, string sortField, int pageNo, int pageSize, ref int resultCount)
 {
     Business.SmsParser smsParserController = new Business.SmsParser();
     return(smsParserController.GetPagedSmsParsers(smsParser, sortField, pageNo, pageSize, ref resultCount));
 }