public override bool Edit(VirAdBrowseVO m) { CodeCommand command = new CodeCommand(); command.CommandText = EDIT; command.Parameters.Add(new SqlParameter() { ParameterName = "@AdId", Value = ParameterHelper.ConvertValue(m.AdId) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@IpCount", Value = ParameterHelper.ConvertValue(m.IpCount) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@PvCount", Value = ParameterHelper.ConvertValue(m.PvCount) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@UvCount", Value = ParameterHelper.ConvertValue(m.UvCount) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@TimeId", Value = ParameterHelper.ConvertValue(m.TimeId) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@CreateDate", Value = ParameterHelper.ConvertValue(m.CreateDate) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@CreateUserId", Value = ParameterHelper.ConvertValue(m.CreateUserId) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@IsDelete", Value = ParameterHelper.ConvertValue(m.IsDelete) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@Id", Value = ParameterHelper.ConvertValue(m.Id) }); int result = DbProxyFactory.Instance.Proxy.ExecuteNonQuery(command); if (result >= 1) { return(true); } return(false); }
protected void btnSave_Click(object sender, EventArgs e) { VirAdBrowseVO info = new VirAdBrowseVO(); info.AdId = int.Parse(ddlAd.SelectedValue); info.CreateDate = DateTime.Now; info.CreateUserId = Account.UserId; info.IpCount = int.Parse(txtIpCount.Value); info.PvCount = int.Parse(txtPvCount.Value); info.TimeId = int.Parse(DateTime.Now.ToString("yyyyMMdd")); info.UvCount = int.Parse(txtUvCount.Value); VirAdBrowseBLL.Instance.Add(info); Response.Redirect("/Admin/Vir/VirAdBrowseList.aspx"); }
public override int InsertIdentityId(VirAdBrowseVO m) { CodeCommand command = new CodeCommand(); command.CommandText = INSERT + "; select @@Identity"; command.Parameters.Add(new SqlParameter() { ParameterName = "@AdId", Value = ParameterHelper.ConvertValue(m.AdId) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@IpCount", Value = ParameterHelper.ConvertValue(m.IpCount) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@PvCount", Value = ParameterHelper.ConvertValue(m.PvCount) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@UvCount", Value = ParameterHelper.ConvertValue(m.UvCount) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@TimeId", Value = ParameterHelper.ConvertValue(m.TimeId) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@CreateDate", Value = ParameterHelper.ConvertValue(m.CreateDate) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@CreateUserId", Value = ParameterHelper.ConvertValue(m.CreateUserId) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@IsDelete", Value = ParameterHelper.ConvertValue(m.IsDelete) }); var result = DbProxyFactory.Instance.Proxy.ExecuteScalar(command); return(int.Parse(result.ToString())); }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string html = ""; string ads = context.Request.Params["adids"] ?? ""; try { Random rd = new Random(); if (!string.IsNullOrEmpty(ads)) { var list = ads.Split(','); for (int i = 0; i < list.Length; i++) { if (!string.IsNullOrEmpty(list[i])) { VirAdBrowseVO info = new VirAdBrowseVO(); info.AdId = int.Parse(list[i]); info.CreateDate = DateTime.Now; info.CreateUserId = 0; info.IpCount = rd.Next(1, 5); info.PvCount = rd.Next(1, 10); info.TimeId = int.Parse(DateTime.Now.ToString("yyyyMMdd")); info.UvCount = rd.Next(1, 10); VirAdBrowseBLL.Instance.Add(info); } } } } catch (Exception ex) { } context.Response.Clear(); context.Response.ClearContent(); context.Response.Write(html); context.Response.End(); }
public override string GetOtherConditionByModel(VirAdBrowseVO m) { return(""); }
public override string GetOrderByModel(VirAdBrowseVO m) { return(""); }