void CreateRequest(ContactVM contact) { ContactRequestRep rep = new ContactRequestRep(); contact.HasEngaged = false; rep.Add(contact); }
public JsonResult GetContractRequests(string input) { string pw = "D0ntd00th!$"; string path = Server.MapPath("~/logs/log.txt"); List <ContactVM> contacts = new List <ContactVM>(); if (!string.IsNullOrEmpty(input.Trim())) { if (input == pw) { try { ContactRequestRep rep = new ContactRequestRep(); contacts = rep.GetAllNotContacted(); } catch (Exception ex) { using (StreamWriter writer = new StreamWriter(path, true)) { writer.WriteLine(string.Concat(DateTime.Now.ToLongDateString(), " :", ex.Message)); } } } } return(Json(contacts, JsonRequestBehavior.AllowGet)); }