Ejemplo n.º 1
0
        private static void notifyCustomer(long orderId)
        {
            //Get the email from the db
            EmailSelectCommandTableAdapter emailAdapter = new EmailSelectCommandTableAdapter();

            CustomerEmailDataSet.EmailSelectCommandDataTable emailTable = emailAdapter.GetEmailAddress(orderId);

            String   name      = "";
            String   email     = "";
            DateTime orderTime = DateTime.Now;

            foreach (CustomerEmailDataSet.EmailSelectCommandRow row in emailTable)
            {
                name      = row.Name;
                email     = row.Email;
                orderTime = row.ORDER_TIME;
            }

            string subject = "Asian Fast Food unable to process your order";
            string message = "Dear " + name + ", we regret that we are unable to processs your order id: " +
                             orderId + " at " + orderTime.ToString() + Environment.NewLine +
                             "We sincerely hope that you will order again with us." + Environment.NewLine +
                             "Kind regards" + Environment.NewLine + "Asian Fast Food";

            MailBiz.sendmail(email, message, subject);
        }
Ejemplo n.º 2
0
        private static void notifyCustomer(long orderId )
        {
            //Get the email from the db
            EmailSelectCommandTableAdapter emailAdapter = new EmailSelectCommandTableAdapter();
            CustomerEmailDataSet.EmailSelectCommandDataTable emailTable = emailAdapter.GetEmailAddress(orderId);

            String name = "";
            String email = "";
            DateTime orderTime = DateTime.Now;

            foreach (CustomerEmailDataSet.EmailSelectCommandRow row in emailTable)
            {

                name = row.Name;
                email = row.Email;
                orderTime = row.ORDER_TIME;

            }

            string subject = "Asian Fast Food unable to process your order";
            string message = "Dear " + name + ", we regret that we are unable to processs your order id: " +
                             orderId + " at " + orderTime.ToString() + Environment.NewLine +
                             "We sincerely hope that you will order again with us." + Environment.NewLine +
                             "Kind regards" + Environment.NewLine + "Asian Fast Food";

            MailBiz.sendmail( email, message, subject );
        }