예제 #1
0
        public static DataSet GetPagerData(int intPageSize, int intCurrentPageIndex)
        {
            int num  = 0;
            int num2 = 0;

            return(Coupons.GetPagerData(intPageSize, intCurrentPageIndex, ref num, ref num2));
        }
예제 #2
0
        public static bool Copy(CouponsInfo entity)
        {
            CouponsInfo entity2 = new CouponsInfo
            {
                Title         = entity.Title,
                SN            = Coupons.CreateSN(),
                Notes         = entity.Notes,
                Touch         = entity.Touch,
                StartTime     = entity.StartTime,
                EndTime       = entity.EndTime,
                UserName      = string.Empty,
                IsUsed        = false,
                Sort          = 999,
                Lang          = JObject.cultureLang,
                AutoTimeStamp = DateTime.Now
            };
            bool flag;

            if (Coupons.ExistsSN(entity.SN))
            {
                do
                {
                    entity.SN = Coupons.CreateSN();
                }while (Coupons.ExistsSN(entity.SN));
                flag = true;
            }
            else
            {
                flag = true;
            }
            return(flag && Coupons.Add(entity2) > 0);
        }
예제 #3
0
 public static bool ExistsSN(string strSN)
 {
     return(Coupons.GetCount(" SN='" + StringUtils.ChkSQL(strSN) + "' ") > 0);
 }
예제 #4
0
 public static IList <CouponsInfo> GetPagerList(int intCurrentPageIndex, int intPageSize, ref int intTotalCount, ref int intTotalPage)
 {
     return(Coupons.GetPagerList("", "Sort ASC,AutoID DESC", intCurrentPageIndex, intPageSize, ref intTotalCount, ref intTotalPage));
 }
예제 #5
0
 public static DataSet GetPagerData(string strFilter, string strCondition, int intPageSize, int intCurrentPageIndex, ref int intTotalCount, ref int intTotalPage)
 {
     return(Coupons.GetPagerData(strFilter, strCondition, " Sort asc,AutoID desc ", intPageSize, intCurrentPageIndex, ref intTotalCount, ref intTotalPage));
 }
예제 #6
0
 public static DataSet GetPagerData(string strCondition, int intPageSize, int intCurrentPageIndex, ref int intTotalCount, ref int intTotalPage)
 {
     return(Coupons.GetPagerData("*", strCondition, intPageSize, intCurrentPageIndex, ref intTotalCount, ref intTotalPage));
 }
예제 #7
0
        public static IList <CouponsInfo> GetList(int intTopCount, string strCondition)
        {
            string strSort = " Sort asc,AutoID desc ";

            return(Coupons.GetList(intTopCount, strCondition, strSort));
        }
예제 #8
0
 public static IList <CouponsInfo> GetTopNList(int intTopCount, string strSort)
 {
     return(Coupons.GetList(intTopCount, string.Empty, strSort));
 }
예제 #9
0
 public static IList <CouponsInfo> GetAllList()
 {
     return(Coupons.GetList(0, string.Empty));
 }
예제 #10
0
 public static CouponsInfo GetTopData()
 {
     return(Coupons.GetTopData(" Sort ASC,AutoID desc "));
 }