Esempio n. 1
0
 public RandomCode GetRandomCodeByCode(int codee)
 {
     using (var sql = new SqlHelper())
     {
         try
         {
             var        internalData = new InternalRandomCode(sql);
             RandomCode code         = internalData.GetRandomCodeByCode(codee);
             return(code);
         }
         catch (Exception ex)
         {
             throw ex;
         }
     }
 }
Esempio n. 2
0
 public int InsertOrUpdate(RandomCode randomcode)
 {
     using (var sql = new SqlHelper())
     {
         try
         {
             var internalData = new InternalRandomCode(sql);
             int result       = internalData.InsertOrUpdateRandomCode(randomcode);
             return(result);
         }
         catch
         {
             throw;
         }
     }
 }
Esempio n. 3
0
 public IList <RandomCode> GetAllTotalRandomCode()
 {
     using (var sql = new SqlHelper())
     {
         List <RandomCode> list = new List <RandomCode>();
         try
         {
             var internalData = new InternalRandomCode(sql);
             list = internalData.GetAllTotalRandomCode();
             return(list);
         }
         catch
         {
             throw;
         }
     }
 }
Esempio n. 4
0
 public RandomCode GetRandomCode(int state = 0)
 {
     using (var sql = new SqlHelper())
     {
         RandomCode code = new RandomCode();
         try
         {
             var internalData = new InternalRandomCode(sql);
             code = internalData.GetRandomCode();
             return(code);
         }
         catch (Exception ex)
         {
             throw ex;
         }
     }
 }
Esempio n. 5
0
 public List <RandomCode> Gettopcode(int topnum = 1)
 {
     using (var sql = new SqlHelper())
     {
         List <RandomCode> list = new List <RandomCode>();
         try
         {
             var internalData = new InternalRandomCode(sql);
             list = internalData.getRandomCodeList(topnum);
             return(list);
         }
         catch
         {
             throw;
         }
     }
 }