コード例 #1
0
        static void SendEmailsToSellersForExpiryRenewal()
        {
            DateTime oneDayAgo = DateTime.Now;

            if (whenTaskLastRan.Date.CompareTo(oneDayAgo.Date) < 0)//(whenTaskLastRan.IsOlderThan(oneDayAgo))
            {
                // now run code to send email and reset our whentasklastrancode.;
                TABusinessLayer.SendEmails sd = new TABusinessLayer.SendEmails();
                sd.CheckExpiredRegistration();

                whenTaskLastRan = DateTime.Now;
            }
        }
コード例 #2
0
        static void SendEmailForAdvertExpiry()
        {
            DateTime oneDayAgo = DateTime.Now;

            if (whenTaskLastRan.Date.CompareTo(oneDayAgo.Date) < 0)//(whenTaskLastRan.IsOlderThan(oneDayAgo))
            {
                // now run code to send email and reset our whentasklastrancode.;
                TABusinessLayer.SendEmails sd = new TABusinessLayer.SendEmails();
                sd.CheckExpiredAdvertSlots();

                whenTaskLastRan = DateTime.Now;
            }
        }
コード例 #3
0
        //
        // GET: /Catalogue/Create

        public ActionResult ContactSeller(int id)
        {
            var CatItem = ta.SellerItemss.Include("SellerDetails").Single(emp => emp.itemId == id);

            //send email
            TABusinessLayer.SendEmails    sd  = new TABusinessLayer.SendEmails();
            TABusinessLayer.SellerDetails det = new TABusinessLayer.SellerDetails();
            det.sellerAddress = CatItem.SellerDetails.sellerAddress;
            det.sellerEmail   = CatItem.SellerDetails.sellerEmail;
            det.sellerName    = CatItem.SellerDetails.sellerName;
            det.sellerPhone   = CatItem.SellerDetails.sellerPhone;

            //need to put back when fixed
            sd.InformSellerOfContactRequest(det);

            //Display Contact details
            if (CatItem == null)
            {
                return(HttpNotFound());
            }
            return(View(CatItem));
        }