Exemplo n.º 1
0
        public ActionResult CheckBill(int ChannelID)
        {
            ApkDataBLL bll = new ApkDataBLL();
            ChannelBLL channelBll = new ChannelBLL();
            List<ApkDataDto> list = (List<ApkDataDto>)channelBll.GetApkDataDtoList(ChannelID, "");
            double sumMoney = list.Sum<ApkDataDto>(t => Convert.ToDouble(t.Money));
            
            string taskids = string.Empty;
            list.ForEach(t => taskids += t.TaskID + ",");

            AdminUser user = CheckLogin.Instance.GetUser();
            //明天做
            AdvertBill bill = new AdvertBill();
            bill.AdvertID = ChannelID;
            bill.LinkManID = user.ID;
            bill.AdMoney = sumMoney.ToString();
            bill.ApplyTime = DateTime.Now;
            bill.PayMoney = "0";
            bill.Status = 0;//0:未付款
            bill.BillType = 1;//1:渠道账单
            bill.TaskIds = taskids;
            AdvertBillBLL advertBillBll = new AdvertBillBLL();

            if (advertBillBll.Add(bill))
            {
                TaskBLL taskBll = new TaskBLL();
                bll.UpdateApkDataStatusByChannelID(ChannelID);
            }

            return MyContent("生成一条新的渠道账单!", "/Channel/ChannelBillList");
        }
Exemplo n.º 2
0
        public ActionResult CheckBill(int AdvertID,int LinkManID)
        {
            ApkDataBLL bll = new ApkDataBLL();
            List<ApkDataDto> list = (List<ApkDataDto>)bll.GetApkDataDtoList(AdvertID,"");
            double sumMoney = list.Sum<ApkDataDto>(t => Convert.ToDouble(t.Money));

            string taskids = string.Empty;
            list.ForEach(t => taskids += t.TaskID + ",");

            AdvertBill bill = new AdvertBill();
            bill.AdvertID = AdvertID;
            bill.LinkManID = LinkManID;
            bill.AdMoney = sumMoney.ToString();
            bill.ApplyTime = DateTime.Now;
            bill.PayMoney = "0";
            bill.Status = 0;//0:未付款
            bill.BillType = 0;//0:广告主
            bill.TaskIds = taskids;
            AdvertBillBLL advertBillBll = new AdvertBillBLL();

            if (advertBillBll.Add(bill))
            {
                TaskBLL taskBll = new TaskBLL();
                bll.UpdateApkDataStatus(AdvertID);
            }
            return MyContent("确认账单成功!请尽快支付款项!","/AdvertBill/AdvertBillList");
        }