public ActionResult Advert(int AdvertID = -1, int LinkManID =-1, int PageIndex = 0,double BeginMoney =-1 ,double EndMoney = -1,DateTime? BeginTime = null,DateTime? Endtime = null,string IsCounted = "false") { #region 保存查询条件 ViewBag.AdvertID = AdvertID; ViewBag.LinkManID = LinkManID; ViewBag.BeginMoney = BeginMoney == -1 ? "" : BeginMoney.ToString(); ViewBag.EndMoney = EndMoney == -1 ? "" : EndMoney.ToString(); ViewBag.BeginTime = BeginTime; ViewBag.Endtime = Endtime; ViewBag.IsCounted = IsCounted; ViewBag.AmIn = "apk"; #endregion if (BeginTime == null) BeginTime = DateTime.Now.AddYears(-20); if (Endtime == null) Endtime = DateTime.Now.AddYears(20); AdvertBLL bll = new AdvertBLL(); AdminUserBLL userBll = new AdminUserBLL(); ViewBag.AdminUsers = userBll.GetAdminUsersByRoleType(RoleType.商务); ViewBag.Adverts = bll.GetAll(); int count; int pageSize = 10; IList<AdvertDTO> list = bll.GetList(AdvertID, LinkManID, BeginMoney == -1 ? 0 : BeginMoney, EndMoney == -1 ? 0 : EndMoney, (DateTime)BeginTime, (DateTime)Endtime, IsCounted == "on", PageIndex, pageSize, out count); ViewBag.AdvertList = list; ViewBag.PageCount = count % pageSize == 0 ? count / pageSize : (count / pageSize) + 1; ViewBag.Record = count; ViewBag.CurrentPage = PageIndex; return View(); }
public ActionResult ApkDataList(string AppName = "", string CPID="", DateTime? begin = null, DateTime? end = null, int AdvertID = 0, int AppID = 0, int Status = -1, string Gb_DataTime = null,string Gb_Advert = null,string Gb_App = null, int PageIndex = 0) { #region 保存参数 ViewBag.begin = begin; ViewBag.end = end; ViewBag.AdvertID = AdvertID; ViewBag.AppID = AppID; ViewBag.Status = Status; ViewBag.AppName = AppName; ViewBag.CPID = CPID; ViewBag.AmIn = "apk"; if (Request["AdvertID"] == null)//表示是第一次请求页面,默认让复选框选中 { ViewBag.Gb_DataTime = Gb_DataTime = "DataDate"; ViewBag.Gb_Advert = Gb_Advert = "Advert"; ViewBag.Gb_App = Gb_App = "App"; } else { ViewBag.Gb_DataTime = Request["Gb_DataTime"]; ViewBag.Gb_Advert = Request["Gb_Advert"]; ViewBag.Gb_App = Request["Gb_App"]; } ViewBag.PageIndex = PageIndex; #endregion AdvertBLL advertBLL = new AdvertBLL(); ViewBag.AdvertList = advertBLL.GetAll(); AppBLL appBLL = new AppBLL(); ViewBag.AppNameIDList = appBLL.GetAll(); string groupBy = GetGroupByStr(Gb_DataTime != null, Gb_Advert != null, Gb_App != null); ViewBag.GroupBy = groupBy; ApkDataBLL bll = new ApkDataBLL(); int count; int pageSize = 10; AdminUser user = CheckLogin.Instance.GetUser(); ViewBag.ApkDataList = bll.GetList(begin != null ? (DateTime)begin : DateTime.Now.AddYears(-20), end != null ? (DateTime)end : DateTime.Now.AddYears(20), AdvertID, AppID, Status, groupBy, user.ID, (int)user.RoleType, PageIndex, pageSize, out count, AppName, CPID); ViewBag.PageCount = count % pageSize == 0 ? count / pageSize : (count / pageSize) + 1; ViewBag.Record = count; ViewBag.CurrentPage = PageIndex; if ((RoleType)user.RoleType == RoleType.渠道) { return View("ChannelApkDataList"); } return View(); }
public ActionResult AdvertBillList(int AdvertID =0,int Status = -1,int PageIndex = 0) { #region 保存查询参数 ViewBag.AdvertID = AdvertID; ViewBag.Status = Status; ViewBag.AmIn = "bill"; #endregion AdvertBLL advertBLL = new AdvertBLL(); ViewBag.AdvertList = advertBLL.GetAll(); int count; int pageSize=10; AdvertBillBLL bll = new AdvertBillBLL(); AdminUser user = CheckLogin.Instance.GetUser(); ViewBag.BillList = bll.GetList(AdvertID, user.ID, (int)user.RoleType, 0, Status, PageIndex, pageSize, out count); ViewBag.PageCount = count % pageSize == 0 ? count / pageSize : (count / pageSize) + 1; ViewBag.Record = count; ViewBag.CurrentPage = PageIndex; return View(); }
public ActionResult TaskList(int AdvertID =0,int AppID =0,string CPID ="",int MeiJieID =0,int PageIndex =0) { #region 保存查询条件 ViewBag.AdvertID = AdvertID; ViewBag.AppID = AppID; ViewBag.CPID = CPID; ViewBag.MeiJieID = MeiJieID; ViewBag.AmIn = "task"; #endregion AppBLL appBll = new AppBLL(); AdvertBLL advertBLL = new AdvertBLL(); AdminUserBLL userBll = new AdminUserBLL(); ViewBag.MeiJieList = userBll.GetAdminUserNameIDsByRoleType(NetworkLeagueModel.Enum.RoleType.媒介); ViewBag.AdvertList = advertBLL.GetAll(); ViewBag.AppNameIDList = appBll.GetAll(); TaskBLL taskBll = new TaskBLL(); int count; int pageSize=10; AdminUser user = CheckLogin.Instance.GetUser(); ViewBag.TaskList = taskBll.GetTaskListByUserID("",AdvertID, AppID, CPID, user.ID, (int)user.RoleType, 0, 0, PageIndex, pageSize, out count); ViewBag.PageCount = count % pageSize == 0 ? count / pageSize : (count / pageSize) + 1; ViewBag.Record = count; ViewBag.CurrentPage = PageIndex; return View(); }
public ActionResult AppEdit(int AppID = 0, App app = null) { ViewBag.AmIn = "apk"; AdvertBLL advertBll = new AdvertBLL(); AppBLL appBLL = new AppBLL(); IList<AdvertNameIDDto> list = advertBll.GetAll(); ViewBag.AdvertList = list; if (Request["id"] == null) { if (AppID == 0) { ViewBag.STitle = "添加"; ViewBag.App = new App(); return View(); } else { ViewBag.STitle = "编辑"; ViewBag.App = appBLL.Get(AppID); return View(); } } else { if (appBLL.CPIDIsExists(app.Cpid, app.ID)) { ViewBag.Message = "CPID已存在"; if (AppID == 0) { ViewBag.STitle = "添加"; ViewBag.App = app; } else { ViewBag.STitle = "编辑"; ViewBag.App = appBLL.Get(AppID); } return View(); } Advert ad = advertBll.Get(app.AdvertID); if (app.ID == 0) { app.CreateTime = DateTime.Now; app.LinkManID = ad.LinkManID; app.LinkManName = ad.LinkManName; if (!appBLL.Add(app)) { ViewBag.Message = "添加失败"; if (AppID == 0) { ViewBag.STitle = "添加"; ViewBag.App = app; } else { ViewBag.STitle = "编辑"; ViewBag.App = appBLL.Get(AppID); } return View(); } } else { app.LinkManID = ad.LinkManID; app.LinkManName = ad.LinkManName; if (!appBLL.Update(app)) { ViewBag.Message = "更新失败"; if (AppID == 0) { ViewBag.STitle = "添加"; ViewBag.App = app; } else { ViewBag.STitle = "编辑"; ViewBag.App = appBLL.Get(AppID); } return View(); } } return RedirectToAction("App", "Home"); } }
public ActionResult App(int AdvertID = 0, int AppID = 0, int PageIndex = 0, int Status = -1) { #region 保存请求参数 ViewBag.AdvertID = AdvertID; ViewBag.AppID = AppID; ViewBag.Status = Status; ViewBag.AmIn = "apk"; #endregion int count,pageSize=10; AppBLL bll = new AppBLL(); AdvertBLL advertBLL = new AdvertBLL(); ViewBag.AdvertList = advertBLL.GetAll(); ViewBag.AppNameIDList = bll.GetAll(); ViewBag.AppList = bll.GetList(AdvertID, AppID, PageIndex, pageSize,Status, out count); ViewBag.PageCount = count % pageSize == 0 ? count / pageSize : (count / pageSize) + 1; ViewBag.Record = count; ViewBag.CurrentPage = PageIndex; return View(); }