public ActionResult AddressAndPayment(FormCollection values) { string userId = User.Identity.GetUserId(); var user = storeDB.Users.Find(userId); if (user.CustomerType == "Customer"||user.verfied==false) { var order = new Order(); TryUpdateModel(order); try { order.Username = User.Identity.Name; order.UserId = User.Identity.GetUserId(); order.OrderDate = DateTime.Now.AddHours(10); var cart = ShoppingCart.GetCart(this.HttpContext); order.Total = cart.GetTotal(); //Save Order storeDB.Orders.Add(order); storeDB.SaveChanges(); //Process the order cart.CreateOrder(order, "Customer",user); return RedirectToAction("Complete", new { id = order.OrderId }); } catch { //Invalid - redisplay with errors return View(order); } } else //Customer type is point of sale { var order = new Order(); TryUpdateModel(order); try { order.Username = User.Identity.Name; order.UserId = User.Identity.GetUserId(); order.OrderDate = DateTime.Now.AddHours(10); var cart = ShoppingCart.GetCart(this.HttpContext); order.Total = cart.GetTotalPoint(); //Save Order storeDB.Orders.Add(order); storeDB.SaveChanges(); //Process the order cart.CreateOrder(order,"PointOfSales",user); return RedirectToAction("Complete", new { id = order.OrderId }); } catch { //Invalid - redisplay with errors return View(order); } } }
public int CreateOrder(Order order,string userType,ApplicationUser user) { decimal orderTotal = 0; decimal orderTotalPoint = 0; string ordermessage = "<table style='width: 100%; border: 1px solid black; border-collapse: collapse;'><tr style='background:#000000;text-align:left;color:#ffffff'>" + "<th>Product Code</th><th>Product Name</th><th>Unit Price</th><th>Qty</th><th>Subtotal</th>" +" </tr>"; var cartItems = GetCartItems(); // Iterate over the items in the cart, // adding the order details for each foreach (var item in cartItems) { var orderDetail = new OrderDetail { productcode=item.ProductSpc.productcode, ProductInfo=item.ProductSpc.ProductInfo, ProductId = item.ProductSpcId, OrderId = order.OrderId, UnitPrice = item.ProductSpc.Price, Quantity = item.Count, Total = item.Count * item.ProductSpc.Price, UnitPricePoint=item.ProductSpc.PointofSalePrice, TotalPoint=item.Count*item.ProductSpc.PointofSalePrice, UserType=userType }; // Set the order total of the shopping cart orderTotal += (item.Count * item.ProductSpc.Price); orderTotalPoint += (item.Count * item.ProductSpc.PointofSalePrice); if (userType == "Customer") { ordermessage = ordermessage + "<tr style='background:#F2F2F2;text-align:left'><td>" + orderDetail.productcode + "</td><td>" + item.ProductSpc.Title + "</td><td>" + orderDetail.UnitPrice + "</td><td>" + orderDetail.Quantity + "</td><td>" + orderDetail.Total + "</td></tr>"; } else { ordermessage = ordermessage + "<tr style='background:#F2F2F2;text-align:left'><td>" + orderDetail.productcode + "</td><td>" + item.ProductSpc.Title + "</td><td>" + orderDetail.UnitPricePoint + "</td><td>" + orderDetail.Quantity + "</td><td>" + orderDetail.TotalPoint + "</td></tr>"; } storeDB.OrderDetails.Add(orderDetail); } // Set the order's total to the orderTotal count order.Total = orderTotal; if (userType == "Customer") { ordermessage = ordermessage + "<tr><td></td><td></td><td></td><td></td><td>Total :" + orderTotal + "$ </td></tr></table>"; SmtpClient smtpClient = new SmtpClient("relay-hosting.secureserver.net", 25); smtpClient.UseDefaultCredentials = false; smtpClient.Credentials = CredentialCache.DefaultNetworkCredentials; smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network; smtpClient.Credentials = new System.Net.NetworkCredential("*****@*****.**", "Howiloveyou"); smtpClient.EnableSsl = false; smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network; string to = user.Email; string gender="Mrs."; if (user.Gender.ToLower() == "male") gender = "Mr."; MailMessage mail = new MailMessage("*****@*****.**", to); mail.Body = " <style type='text/css'> #outlook a{padding:0;}body{width:100% !important; -webkit-text-size-adjust:100%; -ms-text-size-adjust:100%;margin:0;padding:0;}.ExternalClass{width:100%;}.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div{line-height: 100%;}#backgroundTable{margin:0; padding:0; width:100% !important; line-height: 100% !important;}img{outline:none; text-decoration:none;border:none; -ms-interpolation-mode: bicubic;}a img{border:none;}.image_fix{display:block;}p{margin: 0px 0px !important;}table td{border-collapse: collapse;}table{border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;}table[class=full]{width: 100%; clear: both;}@media only screen and (max-width: 640px){a[href^='tel'], a[href^='sms']{text-decoration: none;color: #ffffff; pointer-events: none;cursor: default;}.mobile_link a[href^='tel'], .mobile_link a[href^='sms']{text-decoration: default;color: #ffffff !important;pointer-events: auto;cursor: default;}table[class=devicewidth]{width: 440px!important;text-align:center!important;}table[class=devicewidthinner]{width: 420px!important;text-align:center!important;}table[class='sthide']{display: none!important;}img[class='bigimage']{width:420px!important;height:219px!important;}img[class='col2img']{width: 420px!important;height:258px!important;}img[class='image-banner']{width: 440px!important;height:106px!important;}td[class='menu']{text-align:center !important; padding: 0 0 10px 0 !important;}td[class='logo']{padding:10px 0 5px 0!important;margin: 0 auto !important;}img[class='logo']{padding:0!important;margin: 0 auto !important;}}@media only screen and (max-width: 480px){a[href^='tel'], a[href^='sms']{text-decoration: none;color: #ffffff;pointer-events: none;cursor: default;}.mobile_link a[href^='tel'], .mobile_link a[href^='sms']{text-decoration: default;color: #ffffff !important;pointer-events: auto;cursor: default;}table[class=devicewidth]{width: 280px!important;text-align:center!important;}table[class=devicewidthinner]{width: 260px!important;text-align:center!important;}table[class='sthide']{display: none!important;}img[class='bigimage']{width: 260px!important;height:136px!important;}img[class='col2img']{width: 260px!important;height:160px!important;}img[class='image-banner']{width: 280px!important;height:68px!important;}}</style><body> <div class='block'> <table width='100%' bgcolor='#f6f4f5' cellpadding='0' cellspacing='0' border='0' id='backgroundTable' st-sortable='header'> <tbody> <tr> <td> <table width='580' bgcolor='#467f7f' cellpadding='0' cellspacing='0' border='0' align='center' class='devicewidth' hlitebg='edit' shadow='edit'> <tbody> <tr> <td> <table width='280' cellpadding='0' cellspacing='0' border='0' align='left' class='devicewidth'> <tbody> <tr> <td valign='middle' width='270' style='padding: 10px 0 10px 20px;' class='logo'> <div class='imgpop'> <a href='#' style='text-decoration:none;color:#fff'>Synergy Prsoales Company</a> </div></td></tr></tbody> </table> <table width='280' cellpadding='0' cellspacing='0' border='0' align='right' class='devicewidth'> <tbody> <tr> <td width='270' valign='middle' style='font-family: Helvetica, Arial, sans-serif;font-size: 14px; color: #ffffff;line-height: 24px; padding: 10px 0;' align='right' class='menu' st-content='menu'> <a href='http://synergyprosales.com/' style='text-decoration: none; color: #ffffff;'>HOME</a> | <a href='http://synergyprosales.com/ContactUs/aboutspc' style='text-decoration: none; color: #ffffff;'>ABOUT</a> | <a href='http://synergyprosales.com/ProductSpc' style='text-decoration: none; color: #ffffff;'>SHOP</a> </td><td width='20'></td></tr></tbody> </table> </td></tr></tbody> </table> </td></tr></tbody> </table> </div><div class='block'> <table width='100%' bgcolor='#f6f4f5' cellpadding='0' cellspacing='0' border='0' id='backgroundTable' st-sortable='bigimage'> <tbody> <tr> <td> <table bgcolor='#ffffff' width='580' align='center' cellspacing='0' cellpadding='0' border='0' class='devicewidth' modulebg='edit'> <tbody> <tr> <td width='100%' height='20'></td></tr><tr> <td> <table width='540' align='center' cellspacing='0' cellpadding='0' border='0' class='devicewidthinner'> <tbody> <tr> <td align='center'> <a target='_blank' href='#'><img width='540' border='0' height='282' alt='' style='display:block; border:none; outline:none; text-decoration:none;' src='http://synergyprosales.com//Images/mine/SPC2.jpg' class='bigimage'></a> </td></tr><tr> <td width='100%' height='20'></td></tr><tr> <td style='font-family: Helvetica, arial, sans-serif; font-size: 18px; color: #333333; text-align:left;line-height: 20px;' st-title='rightimage-title'>Dear " + gender + " " + user.FirstName + " " + user.LastName + ", <br></td> </tr><tr><td width='100%' height='20'></td> </tr><td style='font-family:sans-serif; font-size: 14px; color: #95a5a6; text-align:left;line-height: 24px;' st-content='rightimage-paragraph'><p style='font-size:14px;font-weight:bolder;'><p style='font-size:14px;font-weight:bolder;'> Thank you for your order from Synergy Prosales Company online Store.</p> Your order number is: <b style='font-weight:bolder'> 1000" + order.OrderId + " </b> ,and the date of your order is:" + order.OrderDate.ToShortDateString() + "<br/>Your order Details are :<br/><br/>" + ordermessage + " <br/> <table width='100%' cellpadding='0' cellspacing='0' border='0' id='backgroundTable' st-sortable='bigimage'><tr> <td style='font-family: Helvetica, arial, sans-serif; font-size: 14px; color: #95a5a6; text-align:left;line-height: 24px;' st-content='rightimage-paragraph'>Thanks again, for your order. If you have any questions, please don't hesitate to contact us."; mail.Body += " <br/><br/>Sincerely yours.<br/><b style='font-weight:bolder;color:red, line-height: 24px;'> Synergy Prosales Company Team</b>.</td></tr><tr> <td width='100%' height='20'></td></tr><tr> <td style='font-family: Helvetica, arial, sans-serif; font-size: 13px; color: #95a5a6; text-align:left;line-height: 24px;' st-content='rightimage-paragraph'></td></tr><tr> <td width='100%' height='10'></td></tr><tr> <td width='100%' height='20'></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></div><div class='block'> <table width='100%' bgcolor='#f6f4f5' cellpadding='0' cellspacing='0' border='0' id='backgroundTable' st-sortable='fullimage'> <tbody> <tr> <td></td></tr><tr> <td> <table bgcolor='#ffffff' width='580' align='center' cellspacing='0' cellpadding='0' border='0' class='devicewidth' modulebg='edit'> <tbody> <tr> <td width='100%' height='20'> <br/> <hr> <br/> </td></tr><tr> <td> <table width='540' align='center' cellspacing='0' cellpadding='0' border='0' class='devicewidthinner'> <tbody> <tr> <td style='font-family: Helvetica, arial, sans-serif; font-size: 16px; color: #333333; text-align:left;line-height: 34px;' st-title='rightimage-title'> <a href='http://synergyprosales.com/' target='_blank' style='text-decoration:none'> <b style='font-weight:bolder;color:#467f7f;text-decoration:none'>SYNERGY PROSALES COMPANY</b> </a><b style='color:#808080'> | UAE & Lebanon | </b> <br/> </td></tr><tr> <td style='font-family: ' Trebuchet MS ', arial, sans-serif; font-size: 12px; color: #666666; text-align:left;line-height: 23px;' st-content='rightimage-paragraph'> <b style='font-weight:bolder;color:#808080;line-height: 24px;'> UAE-Dubai: Phone:</b><b style='color:#808080;font-weight:bold'>+97148851206</b> | <b style='font-weight:bolder;color:#808080'> Fax:</b><b style='color:#808080;font-weight:normal'> +97148851207</b> | <b style='font-weight:bolder;color:#808080'>PO.Box: </b><b style='color:#808080;font-weight:normal'> 72191</b> | <b style='font-weight:bolder;color:#808080;line-height: 24px;'> Lebanon: Branch 1:</b><b style='color:#808080;font-weight:normal'>Al Jyeh </b>|<b style='font-weight:bolder;;color:#808080'> Phone:</b> <b style='color:#808080;font-weight:normal'> +9617996784; +9613332885 </b>| <b style='font-weight:bolder;color:#808080'>Branch 2: </b><b style='color:#808080;font-weight:normal'>Bchamoun</b> | <b style='font-weight:bolder;color:#808080'> Phone:</b> <b style='color:#808080;font-weight:normal' > +9613332864 |</b> <b style='font-weight:bolder;color:#808080;line-height: 24px;'> E-mail: </b><b style='color:#808080;font-weight:normal'> [email protected]</b>. <br/> </td></tr><tr> <td width='100%' height='10'></td></tr><tr> <td> <table height='30' align='left' valign='middle' border='0' cellpadding='0' cellspacing='0' class='tablet-button' st-button='edit'> <tbody> <tr> <td> <br/> </td></tr><tr> <td width='auto' align='center' valign='middle' height='30' style=' border-top-left-radius:4px; border-bottom-left-radius:4px;border-top-right-radius:4px; border-bottom-right-radius:4px; background-clip: padding-box;font-size:13px; font-family:Helvetica, arial, sans-serif; text-align:center; color:#000; font-weight: 300; padding-left:18px; padding-right:18px;'> <span style='color: #000; font-weight: 300;'> Follow us : </span> </td><td width='auto' style='margin-left:14px;margin-right:3%' align='center' valign='middle' height='30'> <a href='https://www.facebook.com/Synergyprosales' tarege='_blank'> <img src='http://www.mail-signatures.com/articles/wp-content/themes/emailsignatures/images/facebook-35x35.gif'/> </a> </td><td width='auto' style='margin-left:14px;margin-right:3%' align='center' valign='middle' height='30'> <a href='https://twitter.com/synergyprosales' tarege='_blank'> <img src='http://youthfestni.com/img/twitter_icon.jpg'/> </a> </td><td width='auto' style='margin-left:14px;margin-right:3%' align='center' valign='middle' height='30'> <a href='https://plus.google.com/+Synergyprosalescompany/posts' tarege='_blank'> <img src=' http://www.lemanautomotive.com/wp-content/themes/Leman_Automotive/images/googleplus.png'/> </a> </td><td width='auto' style='margin-left:14px;margin-right:3%' align='center' valign='middle' height='30'> <a href='https://www.linkedin.com/company/synergy-prosales-company' tarege='_blank'> <img src='http://www.lar.net.au/assets/img/icon-linkedin.png'/> </a> </td></tr><tr></tr></tbody> </table> </td></tr><tr> <td width='100%' height='20'></td></tr></tbody> </table> </td></tr></tbody> </table> </td></tr></tbody> </table></div><div class='block'> <table width='100%' bgcolor='#f6f4f5' cellpadding='0' cellspacing='0' border='0' id='backgroundTable' st-sortable='postfooter'> <tbody> <tr> <td width='100%'> <table width='580' cellpadding='0' cellspacing='0' border='0' align='center' class='devicewidth'> <tbody> <tr> <td width='100%' height='5'></td></tr><tr> <td align='center' valign='middle' style='font-family: Helvetica, arial, sans-serif; font-size: 10px;color: #999999' st-content='preheader'> <a class='hlite' href='#' style='text-decoration: none; color: #0db9ea'>.</a> </td></tr><tr> <td width='100%' height='5'></td></tr></tbody> </table> </td></tr></tbody> </table></div></body></html>"; mail.Subject = "SPC Order Confirmation "; //Setting From , To and CC mail.CC.Add(new MailAddress("*****@*****.**")); ////mail.CC.Add(new MailAddress("*****@*****.**")); mail.IsBodyHtml = true; smtpClient.Send(mail); } else { ordermessage = ordermessage + "<tr><td></td><td></td><td></td><td></td><td>Total :" + orderTotalPoint + "$ </td></tr></table>"; SmtpClient smtpClient = new SmtpClient("relay-hosting.secureserver.net", 25); smtpClient.UseDefaultCredentials = false; smtpClient.Credentials = CredentialCache.DefaultNetworkCredentials; smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network; smtpClient.Credentials = new System.Net.NetworkCredential("*****@*****.**", "Howiloveyou"); smtpClient.EnableSsl = false; smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network; string gender1 = "Mrs."; if (user.Gender.ToLower() == "male") gender1 = "Mr."; string to = user.Email; MailMessage mail = new MailMessage("*****@*****.**", to); mail.Body = "<style type='text/css'> #outlook a{padding:0;}body{width:100% !important; -webkit-text-size-adjust:100%; -ms-text-size-adjust:100%;margin:0;padding:0;}.ExternalClass{width:100%;}.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div{line-height: 100%;}#backgroundTable{margin:0; padding:0; width:100% !important; line-height: 100% !important;}img{outline:none; text-decoration:none;border:none; -ms-interpolation-mode: bicubic;}a img{border:none;}.image_fix{display:block;}p{margin: 0px 0px !important;}table td{border-collapse: collapse;}table{border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;}table[class=full]{width: 100%; clear: both;}@media only screen and (max-width: 640px){a[href^='tel'], a[href^='sms']{text-decoration: none;color: #ffffff; pointer-events: none;cursor: default;}.mobile_link a[href^='tel'], .mobile_link a[href^='sms']{text-decoration: default;color: #ffffff !important;pointer-events: auto;cursor: default;}table[class=devicewidth]{width: 440px!important;text-align:center!important;}table[class=devicewidthinner]{width: 420px!important;text-align:center!important;}table[class='sthide']{display: none!important;}img[class='bigimage']{width:420px!important;height:219px!important;}img[class='col2img']{width: 420px!important;height:258px!important;}img[class='image-banner']{width: 440px!important;height:106px!important;}td[class='menu']{text-align:center !important; padding: 0 0 10px 0 !important;}td[class='logo']{padding:10px 0 5px 0!important;margin: 0 auto !important;}img[class='logo']{padding:0!important;margin: 0 auto !important;}}@media only screen and (max-width: 480px){a[href^='tel'], a[href^='sms']{text-decoration: none;color: #ffffff;pointer-events: none;cursor: default;}.mobile_link a[href^='tel'], .mobile_link a[href^='sms']{text-decoration: default;color: #ffffff !important;pointer-events: auto;cursor: default;}table[class=devicewidth]{width: 280px!important;text-align:center!important;}table[class=devicewidthinner]{width: 260px!important;text-align:center!important;}table[class='sthide']{display: none!important;}img[class='bigimage']{width: 260px!important;height:136px!important;}img[class='col2img']{width: 260px!important;height:160px!important;}img[class='image-banner']{width: 280px!important;height:68px!important;}}</style><body> <div class='block'> <table width='100%' bgcolor='#f6f4f5' cellpadding='0' cellspacing='0' border='0' id='backgroundTable' st-sortable='header'> <tbody> <tr> <td> <table width='580' bgcolor='#467f7f' cellpadding='0' cellspacing='0' border='0' align='center' class='devicewidth' hlitebg='edit' shadow='edit'> <tbody> <tr> <td> <table width='280' cellpadding='0' cellspacing='0' border='0' align='left' class='devicewidth'> <tbody> <tr> <td valign='middle' width='270' style='padding: 10px 0 10px 20px;' class='logo'> <div class='imgpop'> <a href='#' style='text-decoration:none;color:#fff'>Synergy Prsoales Company</a> </div></td></tr></tbody> </table> <table width='280' cellpadding='0' cellspacing='0' border='0' align='right' class='devicewidth'> <tbody> <tr> <td width='270' valign='middle' style='font-family: Helvetica, Arial, sans-serif;font-size: 14px; color: #ffffff;line-height: 24px; padding: 10px 0;' align='right' class='menu' st-content='menu'> <a href='http://synergyprosales.com/' style='text-decoration: none; color: #ffffff;'>HOME</a> | <a href='http://synergyprosales.com/ContactUs/aboutspc' style='text-decoration: none; color: #ffffff;'>ABOUT</a> | <a href='http://synergyprosales.com/ProductSpc' style='text-decoration: none; color: #ffffff;'>SHOP</a> </td><td width='20'></td></tr></tbody> </table> </td></tr></tbody> </table> </td></tr></tbody> </table> </div><div class='block'> <table width='100%' bgcolor='#f6f4f5' cellpadding='0' cellspacing='0' border='0' id='backgroundTable' st-sortable='bigimage'> <tbody> <tr> <td> <table bgcolor='#ffffff' width='580' align='center' cellspacing='0' cellpadding='0' border='0' class='devicewidth' modulebg='edit'> <tbody> <tr> <td width='100%' height='20'></td></tr><tr> <td> <table width='540' align='center' cellspacing='0' cellpadding='0' border='0' class='devicewidthinner'> <tbody> <tr> <td align='center'> <a target='_blank' href='#'><img width='540' border='0' height='282' alt='' style='display:block; border:none; outline:none; text-decoration:none;' src='http://synergyprosales.com//Images/mine/SPC2.jpg' class='bigimage'></a> </td></tr><tr> <td width='100%' height='20'></td></tr><tr> <td style='font-family: Helvetica, arial, sans-serif; font-size: 18px; color: #333333; text-align:left;line-height: 20px;' st-title='rightimage-title'>Dear " + "" + gender1 + " " + user.FirstName + " " + user.LastName + ",<br></td> </tr><tr><td width='100%' height='20'></td> </tr><td style='font-family:sans-serif; font-size: 14px; color: #95a5a6; text-align:left;line-height: 24px;' st-content='rightimage-paragraph'><p style='font-size:14px;font-weight:bolder;'> Thank you for your order from Synergy Prosales Company online Store.</p> Your point of sale account details are:</br>Point of sale name : <b style='color:green;font-weight:bolder'> " + user.PointofsaleName + "</b>. <br/>Point of sale Type : <b style='color:green;font-weight:bolder'>" + user.TypeofPointsale + "</b>.<p style='font-size:16px;text-aling:center>' Your order number is :<b style='font-weight:bolder'> 1000" + order.OrderId + "</b>,and the date of your order is:" + order.OrderDate.ToShortDateString() + ".</p>Your Order Details are:<br/><br/>" +ordermessage + " <br/> <table width='100%' cellpadding='0' cellspacing='0' border='0' id='backgroundTable' st-sortable='bigimage'><tr> <td style='font-family: Helvetica, arial, sans-serif; font-size: 14px; color: #95a5a6; text-align:left;line-height: 24px;' st-content='rightimage-paragraph'>Thanks again, for your order. If you have any questions, please don't hesitate to contact us."; mail.Body += "<br/><br/>Sincerely yours.<br/><b style='font-weight:bolder;color:red, line-height: 24px;'> Synergy Prosales Company Team</b>.</td></tr><tr> <td width='100%' height='20'></td></tr><tr> <td style='font-family: Helvetica, arial, sans-serif; font-size: 13px; color: #95a5a6; text-align:left;line-height: 24px;' st-content='rightimage-paragraph'></td></tr><tr> <td width='100%' height='10'></td></tr><tr> <td width='100%' height='20'></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></div><div class='block'> <table width='100%' bgcolor='#f6f4f5' cellpadding='0' cellspacing='0' border='0' id='backgroundTable' st-sortable='fullimage'> <tbody> <tr> <td></td></tr><tr> <td> <table bgcolor='#ffffff' width='580' align='center' cellspacing='0' cellpadding='0' border='0' class='devicewidth' modulebg='edit'> <tbody> <tr> <td width='100%' height='20'> <br/> <hr> <br/> </td></tr><tr> <td> <table width='540' align='center' cellspacing='0' cellpadding='0' border='0' class='devicewidthinner'> <tbody> <tr> <td style='font-family: Helvetica, arial, sans-serif; font-size: 16px; color: #333333; text-align:left;line-height: 34px;' st-title='rightimage-title'> <a href='http://synergyprosales.com/' target='_blank' style='text-decoration:none'> <b style='font-weight:bolder;color:#467f7f;text-decoration:none'>SYNERGY PROSALES COMPANY</b> </a><b style='color:#808080'> | UAE & Lebanon | </b> <br/> </td></tr><tr> <td style='font-family: ' Trebuchet MS ', arial, sans-serif; font-size: 12px; color: #666666; text-align:left;line-height: 23px;' st-content='rightimage-paragraph'> <b style='font-weight:bolder;color:#808080;line-height: 24px;'> UAE-Dubai: Phone:</b><b style='color:#808080;font-weight:bold'>+97148851206</b> | <b style='font-weight:bolder;color:#808080'> Fax:</b><b style='color:#808080;font-weight:normal'> +97148851207</b> | <b style='font-weight:bolder;color:#808080'>PO.Box: </b><b style='color:#808080;font-weight:normal'> 72191</b> | <b style='font-weight:bolder;color:#808080;line-height: 24px;'> Lebanon: Branch 1:</b><b style='color:#808080;font-weight:normal'>Al Jyeh </b>|<b style='font-weight:bolder;;color:#808080'> Phone:</b> <b style='color:#808080;font-weight:normal'> +9617996784; +9613332885 </b>| <b style='font-weight:bolder;color:#808080'>Branch 2: </b><b style='color:#808080;font-weight:normal'>Bchamoun</b> | <b style='font-weight:bolder;color:#808080'> Phone:</b> <b style='color:#808080;font-weight:normal' > +9613332864 |</b> <b style='font-weight:bolder;color:#808080;line-height: 24px;'> E-mail: </b><b style='color:#808080;font-weight:normal'> [email protected]</b>. <br/> </td></tr><tr> <td width='100%' height='10'></td></tr><tr> <td> <table height='30' align='left' valign='middle' border='0' cellpadding='0' cellspacing='0' class='tablet-button' st-button='edit'> <tbody> <tr> <td> <br/> </td></tr><tr> <td width='auto' align='center' valign='middle' height='30' style=' border-top-left-radius:4px; border-bottom-left-radius:4px;border-top-right-radius:4px; border-bottom-right-radius:4px; background-clip: padding-box;font-size:13px; font-family:Helvetica, arial, sans-serif; text-align:center; color:#000; font-weight: 300; padding-left:18px; padding-right:18px;'> <span style='color: #000; font-weight: 300;'> Follow us : </span> </td><td width='auto' style='margin-left:14px;margin-right:3%' align='center' valign='middle' height='30'> <a href='https://www.facebook.com/Synergyprosales' tarege='_blank'> <img src='http://www.mail-signatures.com/articles/wp-content/themes/emailsignatures/images/facebook-35x35.gif'/> </a> </td><td width='auto' style='margin-left:14px;margin-right:3%' align='center' valign='middle' height='30'> <a href='https://twitter.com/synergyprosales' tarege='_blank'> <img src='http://youthfestni.com/img/twitter_icon.jpg'/> </a> </td><td width='auto' style='margin-left:14px;margin-right:3%' align='center' valign='middle' height='30'> <a href='https://plus.google.com/+Synergyprosalescompany/posts' tarege='_blank'> <img src=' http://www.lemanautomotive.com/wp-content/themes/Leman_Automotive/images/googleplus.png'/> </a> </td><td width='auto' style='margin-left:14px;margin-right:3%' align='center' valign='middle' height='30'> <a href='https://www.linkedin.com/company/synergy-prosales-company' tarege='_blank'> <img src='http://www.lar.net.au/assets/img/icon-linkedin.png'/> </a> </td></tr><tr></tr></tbody> </table> </td></tr><tr> <td width='100%' height='20'></td></tr></tbody> </table> </td></tr></tbody> </table> </td></tr></tbody> </table></div><div class='block'> <table width='100%' bgcolor='#f6f4f5' cellpadding='0' cellspacing='0' border='0' id='backgroundTable' st-sortable='postfooter'> <tbody> <tr> <td width='100%'> <table width='580' cellpadding='0' cellspacing='0' border='0' align='center' class='devicewidth'> <tbody> <tr> <td width='100%' height='5'></td></tr><tr> <td align='center' valign='middle' style='font-family: Helvetica, arial, sans-serif; font-size: 10px;color: #999999' st-content='preheader'> <a class='hlite' href='#' style='text-decoration: none; color: #0db9ea'>.</a> </td></tr><tr> <td width='100%' height='5'></td></tr></tbody> </table> </td></tr></tbody> </table></div></body></html>"; mail.Subject = "SPC Order Confirmation "; mail.CC.Add(new MailAddress("*****@*****.**")); ////mail.CC.Add(new MailAddress("*****@*****.**")); mail.IsBodyHtml = true; smtpClient.Send(mail); } // Save the order storeDB.SaveChanges(); // Empty the shopping cart EmptyCart(); // Return the OrderId as the confirmation number return order.OrderId; }