Example #1
0
        /// <summary>
        /// 下级的返利 应付返利
        /// </summary>
        /// <returns></returns>
        public ActionResult OutRebate()
        {
            C_UserVM user = C_UserVM.GetVMByID(CurrentUser.ID);

            if (user.C_UserTypeID > 2)
            {
                return(View(ErrorPage.ViewName, new ErrorPage {
                    Message = "您还未达到总裁级别,没有应付的返利"
                }));
            }
            ViewData["user"] = user;
            OutRebateStatistics reba       = new OutRebateStatistics();
            DateTime            lastMonDat = DateTime.Now.AddMonths(-1);

            reba.lastMonMoney = C_UserRebate.GetRebateMoney_tj("", lastMonDat, "未发放", CurrentUser.UserName);
            return(View(reba));
        }
Example #2
0
        //
        // GET: /MyRebate/
        /// <summary>
        /// 我的返利
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            ViewData["user"] = C_UserVM.GetVMByID(CurrentUser.ID);

            RebateStatistics reba = new RebateStatistics();

            reba.thisMonMoneyTJ = C_UserRebate.GetRebateMoney_tj(CurrentUser.UserName, DateTime.Now, "未发放", ""); //本月推荐返利
            reba.thisMonMoneyNH = C_UserRebate.GetRebateMoney_nh(CurrentUser.UserName, DateTime.Now, "未发放", ""); //本月拿货返利
            reba.thisMonMoney   = reba.thisMonMoneyTJ + reba.thisMonMoneyNH;

            reba.HistoryMoneyTJ = C_UserRebate.GetRebateMoneyHistory_tj(CurrentUser.UserName, "未发放"); //历史推荐返利
            reba.HistoryMoneyNH = C_UserRebate.GetRebateMoneyHistory_nh(CurrentUser.UserName, "未发放"); //历史拿货返利
            reba.HistoryMoney   = reba.HistoryMoneyTJ + reba.HistoryMoneyNH;                          //历史返利
            reba.My_tjs_cnt     = C_UserRebate.getMy_tjs_cnt(CurrentUser.UserName);

            return(View(reba));
        }
Example #3
0
        public ActionResult GetUpdateCancelRebate(string ID, string mon, string cat)
        {
            if (cat == "nh")
            {
                cat = "拿货返利";
            }
            else if (cat == "tj")
            {
                cat = "推荐返利";
            }
            else
            {
                return(Content("该返利类型不存在"));
            }
            DateTime DatMon = new DateTime();

            DateTime.TryParse(mon, out DatMon);
            string rtn = C_UserRebate.UpdateRebateStateCancel(ID, DatMon, cat, "总部");

            return(Content(rtn));
        }