Ejemplo n.º 1
0
        public List <ActivityBuild> GetActivityBuild(string sqlStr, int pageSize, int pageIndex, out int recordCount)
        {
            string strConn = ConfigurationManager.ConnectionStrings["Gungnir"].ConnectionString;

            strConn = SecurityHelp.IsBase64Formatted(strConn) ? SecurityHelp.DecryptAES(strConn) : strConn;
            SqlConnection conn = new SqlConnection(strConn);

            return(DALActivity.GetActivityBuild(conn, sqlStr, pageSize, pageIndex, out recordCount));
        }
Ejemplo n.º 2
0
        public bool SaveCouponActivityWebConfig(SqlConnection conn, WebCouponActivity configObject, string userName)
        {
            var result = false;
            int rows   = DALActivity.SaveCouponActivityWebConfig(conn, configObject, userName);

            if (rows > 0)
            {
                result = true;
            }
            return(result);
        }
Ejemplo n.º 3
0
        public Tuple <int, List <CouponActivity> > GetActivityList(SqlConnection conn, string type, int pageSize, int pageIndex)
        {
            type = type?.ToLower();
            switch (type)
            {
            case "app":
                return(DALActivity.GetActivityListForApp(conn, pageSize, pageIndex));

            case "web":
                return(DALActivity.GetActivityListForWeb(conn, pageSize, pageIndex));

            default:
                return(Tuple.Create(0, new List <CouponActivity>()));
            }
        }
Ejemplo n.º 4
0
        public WebCouponActivity GetCurrentWebCouponActivity(SqlConnection conn, string id)
        {
            int activityId;
            WebCouponActivity activity = null;

            if (int.TryParse(id, out activityId))
            {
                activity = DALActivity.GetCurrentWebCouponActivityByActivityId(conn, activityId);
            }
            else
            {
                var activityKey = id;
                activity = DALActivity.GetCurrentWebCouponActivityByActivityKey(conn, activityKey);
            }
            return(activity);
        }
Ejemplo n.º 5
0
 public bool DeleteActivityConfig(SqlConnection conn, string type, string id, string userName)
 {
     return(DALActivity.DeleteActivityConfig(conn, type, id, userName));
 }
Ejemplo n.º 6
0
 public CouponActivity GetCurrentCouponActivity(SqlConnection conn, string id)
 {
     return(DALActivity.GetCurrentCouponActivity(conn, id));
 }
Ejemplo n.º 7
0
 public int CreateActivity(string title)
 {
     return(dbManager.Execute(conn => DALActivity.CreateActivity(conn, title)));
 }
Ejemplo n.º 8
0
 public ActivityBuild GetActivityBuildById(int id)
 {
     return(dbManager.Execute(conn => DALActivity.GetActivityBuildById(conn, id)));
 }
Ejemplo n.º 9
0
 public int GetMaxID()
 {
     return(dbManager.Execute(conn => DALActivity.GetMaxID(conn)));
 }
Ejemplo n.º 10
0
 public bool DeleteActivityBuild(int id)
 {
     return(dbManager.Execute(conn => DALActivity.DeleteActivityBuild(conn, id)));
 }
Ejemplo n.º 11
0
 public bool UpdateActivityBuild(ActivityBuild model, int id)
 {
     return(dbManager.Execute(conn => DALActivity.UpdateActivityBuild(conn, model, id)));
 }
Ejemplo n.º 12
0
 public bool InsertActivityBuild(ActivityBuild model)
 {
     return(dbManager.Execute(conn => DALActivity.InsertActivityBuild(conn, model)));
 }
Ejemplo n.º 13
0
 /// <summary>
 /// 批量 获取 优惠券
 /// </summary>
 /// <param name="conn"></param>
 /// <param name="pkids"></param>
 /// <returns></returns>
 public List <WebCouponActivityRuleModel> SelectCouponRuleByCouponRulesPKID(SqlConnection conn, List <int> pkids)
 {
     return(DALActivity.SelectCouponRuleByCouponRulesPKID(conn, pkids));
 }
Ejemplo n.º 14
0
 public WebCouponActivityRuleModel SelectCouponRule(SqlConnection conn, Guid GetRuleGUID)
 {
     return(DALActivity.SelectCouponRule(conn, GetRuleGUID));
 }
Ejemplo n.º 15
0
 public List <ActivityBuild> SelectActivityDetailsForActivityBoard(SqlConnection conn, DateTime start, DateTime end, string title, string createdUser, string owner)
 {
     return(DALActivity.SelectActivityDetailsForActivityBoard(conn, start, end, title, createdUser, owner));
 }