Exemplo n.º 1
0
        public ActionResult PendingSales(Deal deal, FormCollection collection)
        {
            deal.NotifySalesId = GetAssignToId(collection);
            UpdateDeal(deal, new[] {"ChinaRegion", "ProvinceId", "Industry2Id", "NotifySalesId"});

            var dbDeal = GetDeal(deal.Id);
            dbDeal.StatusId = PendingSalesStatusId;
            SaveApproveHistory(dbDeal.Id, "Wait for Sales Confirmation", GetComment(collection));
            Db.SaveChanges();

            var url = Url.AbsoluteAction("Details", "Deals", new {id = deal.Id});
            var tmp = new MailTempleteHepler().GetTemplete(MailTempleteHepler.SalesCofirm);
            var msg = string.Format(tmp, dbDeal.Name, url);
            MHelper.SendMail(
                new[] {GetAssignUser(collection).Email},
                new[] {GetCurrentMemberShipUser().Email},
                new[] {GetCurrentMemberShipUser().Email},
                "新的合作伙伴业务机会正在等待你的回复确认",
                msg);

            return Redirect("../Index");
        }
Exemplo n.º 2
0
        protected override void OnApproved(Deal deal, FormCollection collection)
        {
            base.OnApproved(deal, collection);

            Deal dbDeal = GetDeal(deal.Id);
            string url = Url.AbsoluteAction("Details", "Deals", new {id = deal.Id});
            string tmp = new MailTempleteHepler().GetTemplete(MailTempleteHepler.DealApproved);
            string msg = string.Format(tmp, dbDeal.Customer.Name, url);
            MHelper.SendMail(
                new[] {deal.Notifier.Email, deal.Approver.Email},
                new[] {GetCurrentMemberShipUser().Email},
                "合作伙伴业务机会已经获得渠道部门批准",
                msg);
        }
Exemplo n.º 3
0
 protected void SendApprovedMail(Deal deal, FormCollection collection)
 {
     var dbDeal = GetDeal(deal.Id);
     var url = Url.AbsoluteAction("Details", "Deals", new {id = deal.Id});
     var tmp = new MailTempleteHepler().GetTemplete(MailTempleteHepler.DealApproved);
     var msg = string.Format(tmp, dbDeal.Customer.Name, url,deal.Partner.Name);
     MHelper.SendMail(
         new[] {GetAssignUser(collection).Email},
         new[] {GetCurrentMemberShipUser().Email},
         new[] {GetCurrentMemberShipUser().Email},
         "合作伙伴业务机会已经获得渠道部门批准",
         msg);
 }
Exemplo n.º 4
0
 protected void SendRejectMail(Deal deal, FormCollection collection)
 {
     try
     {
         var dbDeal = GetDeal(deal.Id);
         var url = Url.AbsoluteAction("Details", "Deals", new {id = deal.Id});
         var tmp = new MailTempleteHepler().GetTemplete(MailTempleteHepler.DealRejected);
         var msg = string.Format(tmp, dbDeal.Customer.Name, url, deal.Partner.Name);
         MHelper.SendMail(
             new[] {GetAssignUser(collection).Email},
             new[] {GetCurrentMemberShipUser().Email},
             new[] {GetCurrentMemberShipUser().Email},
             "合作伙伴业务机会已经被拒绝",
             msg);
     }
     catch (Exception e)
     {
         Logger.Error(e.Message);
     }
 }