Exemplo n.º 1
0
 public ActionResult AdditionalDetails(FormCollection form)
 {
     EnquiryDetails details = new EnquiryDetails();
        details.Amount = Convert.ToDouble(form.GetValue("amount").AttemptedValue);
        details.FileName = form.GetValue("uploadpath").AttemptedValue.ToString();
        details.UniqueName = form.GetValue("savedName").AttemptedValue.ToString();
        details.EnquiryID = Convert.ToInt32(TempData["EnquiryId"]);
        enquiryDetailsRepository.InsertOrUpdate(details);
        enquiryDetailsRepository.Save();
        return RedirectToAction("Details", new { id = details.EnquiryID });
 }
Exemplo n.º 2
0
 public void InsertOrUpdate(EnquiryDetails enquirydetails)
 {
     if (enquirydetails.EnquiryDetailsID == default(int))
     {
         // New entity
         context.EnquiryDetails.Add(enquirydetails);
     }
     else
     {
         // Existing entity
         context.Entry(enquirydetails).State = EntityState.Modified;
     }
 }