public ActionResult UpdateAliPayBaoYangSetting(AliPayBaoYangActivity model)
        {
            bool flag = false;

            if (model != null)
            {
                AliPayBaoYangManage.UpdateAliPayBaoYangActivity(model);
                flag = true;
            }
            return(Json(flag, JsonRequestBehavior.AllowGet));
        }
예제 #2
0
 public static int UpdateAliPayBaoYangActivity(AliPayBaoYangActivity model)
 {
     using (var dbhelper = new SqlDbHelper(ConnectionHelper.GetDecryptConn("ThirdParty")))
     {
         var cmd = new SqlCommand(@"update [dbo].[AliPayBaoYangActivity]
       set BeginTime=@BeginTime,
       EndTime=@EndTime,
       UpdateTime=@updatetime");
         cmd.CommandType = CommandType.Text;
         DateTime datetime = DateTime.Now;
         cmd.Parameters.AddWithValue("@BeginTime", model.BeginTime);
         cmd.Parameters.AddWithValue("@EndTime", model.EndTime);
         cmd.Parameters.AddWithValue("@UpdateTime", datetime);
         return(Convert.ToInt32(dbhelper.ExecuteNonQuery(cmd)));
     }
 }
예제 #3
0
        public static AliPayBaoYangActivity GetAliPayBaoYangActivity()
        {
            // SupplierInfo result = null;
            AliPayBaoYangActivity        item = null;
            List <AliPayBaoYangActivity> items;

            using (var dbhelper = new SqlDbHelper(ConnectionHelper.GetDecryptConn("ThirdPartyReadOnly")))
            {
                string sqlstr = string.Empty;

                sqlstr = @"SELECT [PKID],[Name],[BeginTime],[EndTime],[CreateTime],[UpdateTime] FROM [dbo].[AliPayBaoYangActivity]";

                var cmd = new SqlCommand(sqlstr);
                cmd.CommandType = CommandType.Text;

                items = dbhelper.ExecuteDataTable(cmd).ConvertTo <AliPayBaoYangActivity>().ToList();
                if (items != null && items.FirstOrDefault() != null)
                {
                    item = items.First();
                }
            }
            return(item);
        }
예제 #4
0
 public static int UpdateAliPayBaoYangActivity(AliPayBaoYangActivity model)
 {
     return(DALAliPayBaoYang.UpdateAliPayBaoYangActivity(model));
 }