public ActionResult SaveEmailtemplate(string TemplateId) { StaffandTrain.Models.EmailTemplate objemail = new StaffandTrain.Models.EmailTemplate(); try { if (TempData["Message"] != null) { ViewBag.Message = TempData["Message"]; } if (!string.IsNullOrEmpty(TemplateId)) { int TemplateIddecrypt = Convert.ToInt32(CryptorEngine.Decrypt(cm.Code_Decrypt(Convert.ToString(TemplateId)))); var emailtempdata = context.SPgetemailtemplatebytemplateid(TemplateIddecrypt).FirstOrDefault(); if (emailtempdata != null) { objemail.TemplateId = emailtempdata.TemplateId; objemail.TemplateIdDecrypt = emailtempdata.TemplateId; objemail.TemplateName = emailtempdata.TemplateName; //objemail.EmailBody = cm.StripHTML(emailtempdata.EmailBody.Replace(" ", "").Replace("nbsp;", "")); objemail.EmailBody = (emailtempdata.EmailBody.Replace(" ", " ").Replace("nbsp;", " ")); objemail.Subject = emailtempdata.Subject; } } } catch (Exception ex) { cm.ErrorExceptionLogingByService(ex.ToString(), "EmailTemplate" + ":" + new StackTrace().GetFrame(0).GetMethod().Name, "SaveEmailtemplate", "NA", "NA", "NA", "WEB"); } return(View(objemail)); }
public ActionResult WhiteBoardDetails(string wbid) { var Jobdetails = new List <ManageJobs>(); try { if (!string.IsNullOrEmpty(wbid)) { int wbiddecrypt = Convert.ToInt32(CryptorEngine.Decrypt(cm.Code_Decrypt(Convert.ToString(wbid)))); string query = "[dbo].[SpGetJobdetailsbyWbid] @WhiteboardID = " + wbiddecrypt; Jobdetails = context.Database.SqlQuery <ManageJobs>(query).ToList(); if (Jobdetails.Count() > 0) { ViewBag.wbname = ""; } ViewBag.wbid = wbiddecrypt; if (TempData["Message"] != null) { ViewBag.Message = TempData["Message"]; } } } catch (Exception ex) { cm.ErrorExceptionLogingByService(ex.ToString(), "WhiteBoards" + ":" + new StackTrace().GetFrame(0).GetMethod().Name, "WhiteBoardDetails", "NA", "NA", "NA", "WEB"); } return(View(Jobdetails)); }
public ActionResult Index(string Compid) { if (string.IsNullOrEmpty(Compid)) { return(RedirectToAction("Index", "ProspectListsClient")); } CompContact objcomp = new CompContact(); try { int CompidIddecrypt = Convert.ToInt32(CryptorEngine.Decrypt(cm.Code_Decrypt(Convert.ToString(Compid)))); var data = context.SPgetCompdetailsbycompid(CompidIddecrypt).FirstOrDefault(); if (data != null) { objcomp.name = data.name; objcomp.biztype = data.biztype; objcomp.addr2 = data.addr2; objcomp.addr1 = data.addr1; objcomp.weburl = data.weburl; if (data.weburl != "" && data.weburl != null) { if (!data.weburl.Contains("http://") || !data.weburl.Contains("https://")) { objcomp.weburl = "http://" + data.weburl; } } objcomp.city = data.city; objcomp.state = data.state; objcomp.zip = data.zip; if (data.target == null) { objcomp.target = false; } else { objcomp.target = Convert.ToBoolean(data.target); } if (data.priority == null) { objcomp.priority = false; } else { objcomp.priority = Convert.ToBoolean(data.priority); } objcomp.phone = data.phone; objcomp.citycircle = data.citycircle; objcomp.listid = data.listid; objcomp.companyid = CompidIddecrypt; var CompContacts = context.SpGetContactlistbyCompid(CompidIddecrypt, objcomp.listid).ToList(); if (CompContacts != null) { foreach (var i in CompContacts) { ContactDetails objcondetails = new ContactDetails(); objcondetails.contactid = i.contactid; objcondetails.companyid = i.companyid; objcondetails.contactfullname = i.contactfullname; objcondetails.titlestandard = i.titlestandard; objcondetails.contactphone = i.contactphone; objcondetails.contactcellphone = i.contactcellphone; objcondetails.contactemail = i.contactemail; objcondetails.listid = i.listid; objcondetails.linkedinprofileurl = i.linkedinprofileurl; objcondetails.combinednotes = i.combinednotes; objcondetails.contactemail = i.contactemail; } } } var Complst = context.SPgetCompanies(objcomp.listid).ToList().Select(xx => new SelectListItem { Value = xx.companyid.ToString(), Text = xx.name + " - Business Type : " + xx.biztype }).ToList(); ViewData["Complst"] = Complst; if (TempData["ConEmail"] != null) { ViewBag.ConEmail = TempData["ConEmail"]; } } catch (Exception ex) { cm.ErrorExceptionLogingByService(ex.ToString(), "ProspectViewCompanyClient" + ":" + new StackTrace().GetFrame(0).GetMethod().Name, "Index", "NA", "NA", "NA", "WEB"); } return(View(objcomp)); }