public ActionResult vendorreply(string orderid) { DateTime indianTime = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, INDIAN_ZONE); var s1 = ViewBag.orderdetails = orderService.allorderslist1().ToList().Where(m => m.orderid == long.Parse(orderid)).FirstOrDefault(); var userdata = userLoginDetailsService.GetUserId((int)s1.cutomerid); var userdetails = userLoginDetailsService.GetUser((int)s1.cutomerid); QuotationsList quotationsList = new QuotationsList(); var s12 = ViewBag.orderdetails = orderService.allorderslist1().ToList().Where(m => m.orderid == long.Parse(orderid)).ToList(); var vendordetails = newmanageuse.getvendor(Convert.ToInt32(s1.vid)); List <SPGETNpkg_Result> package = new List <SPGETNpkg_Result>(); List <SPGETNpkg_Result> package1 = new List <SPGETNpkg_Result>(); List <SPGETNpkg_Result> package2 = new List <SPGETNpkg_Result>(); package = viewservicesss.getvendorpkgs(Convert.ToString(s1.vid)); txtto = vendordetails.EmailId; string vname = vendordetails.BusinessName; ViewBag.name = vendordetails.BusinessName; ViewBag.Email = vendordetails.EmailId; ViewBag.bookdate = s1.bookdate.ToString(); ViewBag.orderid = orderid; return(View()); }
public ActionResult submitquery1(string emailid, string txtone, string cid, string selectedcontest) { var contestdetails = contestsService.GetAllEntries(long.Parse(selectedcontest)); var cont1 = contestdetails.Where(m => m.ContestId == long.Parse(cid)).FirstOrDefault(); // var userdetails = userLoginDetailsService.GetUser(id); var typeid = cont1.UserLoginID; var username = cont1.Name; UserLoginDetailsService userLoginDetailsService = new UserLoginDetailsService(); username = Capitalise(username); var userlogin = userLoginDetailsService.GetUserId(Convert.ToInt32(typeid)); emailid = userlogin.UserName; EmailSendingUtility emailSendingUtility = new EmailSendingUtility(); string url = Request.Url.Scheme + "://" + Request.Url.Authority + "/Contests"; FileInfo File = new FileInfo(Server.MapPath("/mailtemplate/Contest.html")); string readFile = File.OpenText().ReadToEnd(); readFile = readFile.Replace("[Message]", txtone); readFile = readFile.Replace("[ActivationLink]", url); readFile = readFile.Replace("[name]", username); string txtmessage = readFile;//readFile + body; string subj = "Contestant Is declined"; emailSendingUtility.Email_maaaahwanam(emailid, txtmessage, subj, null); ViewBag.display = cid; var contestdetails1 = contestsService.GetAllEntries(long.Parse(selectedcontest)); var cont11 = contestdetails.Where(m => m.ContestId == long.Parse(cid)).FirstOrDefault(); ViewBag.selectedcontest = cont1; string command = "InActive"; contestsService.Activationcontest(cont1, command); return(Json("success", JsonRequestBehavior.AllowGet)); }
public ActionResult AllEnteredContestes(string selectedcontest, string id, string command, string selectedcontest1) { var records = contestsService.GetAllContests(); ViewBag.records = records; if (selectedcontest != null && selectedcontest != "Select Contest" && selectedcontest1 == null) { ViewBag.contests = contestsService.GetAllEntries(long.Parse(selectedcontest)); ViewBag.selectedcontest = selectedcontest; } if (id != "0" && id != null && command == null && selectedcontest != null && selectedcontest != "Select Contest") { ViewBag.selectedcontest = selectedcontest; ViewBag.display = id; var contestdetails = contestsService.GetAllEntries(long.Parse(selectedcontest)); ViewBag.contestdetails = contestdetails.Where(m => m.ContestId == long.Parse(id)).FirstOrDefault(); } if (id != "0" && id != null && command != null && selectedcontest1 != null) { ViewBag.display = id; var contestdetails = contestsService.GetAllEntries(long.Parse(selectedcontest1)); var cont1 = contestdetails.Where(m => m.ContestId == long.Parse(id)).FirstOrDefault(); ViewBag.selectedcontest = cont1; var username = cont1.Name; var typeid = cont1.UserLoginID; username = Capitalise(username); UserLoginDetailsService userLoginDetailsService = new UserLoginDetailsService(); var userlogin = userLoginDetailsService.GetUserId(Convert.ToInt32(typeid)); var emailid = userlogin.UserName; EmailSendingUtility emailSendingUtility = new EmailSendingUtility(); FileInfo File = new FileInfo(Server.MapPath("/mailtemplate/Contest.html")); string readFile = File.OpenText().ReadToEnd(); var txtone = " Your contest is activated"; readFile = readFile.Replace("[Message]", txtone); string url = Request.Url.Scheme + "://" + Request.Url.Authority + "/Contests"; readFile = readFile.Replace("[ActivationLink]", url); readFile = readFile.Replace("[name]", username); string txtmessage = readFile;//readFile + body; string subj = "Attention required"; emailSendingUtility.Email_maaaahwanam(emailid, txtmessage, subj, null); string txtmessage1 = username + " " + "is activated for father's day contest"; string subj1 = "Contestant is activated"; emailSendingUtility.Email_maaaahwanam("*****@*****.**", txtmessage1, subj1, null); contestsService.Activationcontest(cont1, command); return(Content("<script language='javascript' type='text/javascript'>alert('Vendor is " + command + "');location.href='" + @Url.Action("AllEnteredContestes", "ContestsManagement") + "'</script>")); } if (id != "0" && id != null && selectedcontest1 != null) { ViewBag.selectedcont1 = selectedcontest1; ViewBag.display = id; var contestdetails = contestsService.GetAllEntries(long.Parse(selectedcontest1)); var cont1 = contestdetails.Where(m => m.ContestId == long.Parse(id)).ToList(); ViewBag.selectedcontest1 = cont1; // contestsService.Activationcontest(cont1, command); // return Content("<script language='javascript' type='text/javascript'>alert('Vendor is " + command + "');location.href='" + @Url.Action("AllEnteredContestes", "ContestsManagement") + "'</script>"); } return(View()); }