Esempio n. 1
0
 public ActionResult Apply(int AppID,int UserID)
 {
     ViewBag.AmIn = "task";
     AdminUser user = CheckLogin.Instance.GetUser();
     TaskBLL bll = new TaskBLL();
     AppBLL appBll = new AppBLL();
     App app = appBll.Get(AppID);
     Task task = new Task();
     task.AppID = app.ID;
     task.ApplyTime = DateTime.Now;
     task.AppName = app.AppName;
     task.ChannelPrice = app.ChannelPrice;
     task.CPID = app.Cpid;
     task.CustomServiceID = user.ID;
     task.CustomServiceName = user.RealName;
     task.LinkManID = app.LinkManID;
     task.LinkManName = app.LinkManName;
     task.Price = app.Price;
     task.Remain = app.Remain;
     task.Result = 0;
     task.Status = 0;
     task.ChannelID = UserID;
     bll.Apply(task);
     app.Status = 1;
     appBll.Update(app);
     return MyContent("申请任务成功,等待商务审核!", "/Task/TaskCanApplyList");
 }
Esempio n. 2
0
 public ActionResult Delete(int id)
 {
     AppBLL bll = new AppBLL();
     if (bll.Delete(id))
     {
         return Content("成功删除广告!","/Home/App");
     }
     return RedirectToAction("App", "Home");
 }
Esempio n. 3
0
        //
        // GET: /App/

        public ActionResult XiaJia(int id)
        {
            AppBLL bll = new AppBLL();
            App app = bll.Get(id);
            app.Status = (int)AppStatus.下架;
            if (bll.Update(app))
            {
                return MyContent("成功下架广告!","/Home/App");
            }
            return RedirectToAction("App", "Home");
        }
Esempio n. 4
0
        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();
        }
Esempio n. 5
0
        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();
        }
Esempio n. 6
0
        public ActionResult TaskCanApplyList(string AppName = "", string CPID = "", int PageIndex = 0)
        {
            ViewBag.AmIn = "taskapply";
            ViewBag.AppName = AppName;
            ViewBag.CPID = CPID;

            int count;
            int pageSize = 10;
            AdminUserBLL userBll = new AdminUserBLL();
            ViewBag.UserList = userBll.GetAdminUserNameIDsByRoleType(RoleType.渠道);
            AppBLL bll = new AppBLL();
            ViewBag.AppList = bll.GetAppListByNameAndCPID(AppName, CPID, PageIndex, pageSize, out count); ;
            ViewBag.PageCount = count % pageSize == 0 ? count / pageSize : (count / pageSize) + 1;
            ViewBag.Record = count;
            ViewBag.CurrentPage = PageIndex;
            return View();
        }
Esempio n. 7
0
 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");
     }
 }
Esempio n. 8
0
        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();
        }