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; } } }
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; } } }
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; } } }
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; } } }
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; } } }