public ActionResult Documents() { var model = new ScanDocumentModel(); var docTypes = contractApi.GetDocument(WorkflowID); model.DocumentTypes = from c in docTypes select new SelectListItem { Text = c.DocumentName, Value = c.DocumentTypeId.ToString() }; return PartialView("_documents", model); }
public ActionResult ScanDoc() { var model = new ScanDocumentModel(); model.DocumentTypes = GetDocTypes(); return View(model); // return PartialView("_ScanDoc", model); }
public void Index(ScanDocumentModel mod, HttpPostedFileBase file) { if (ModelState.IsValid) { var docModel = new Pecuniaus.Models.Contract.DocumentModel(); string fileName = ""; string fileType = ""; if (file != null && file.ContentLength > 0) { fileName = "doc_" + ContractID + "_" + Guid.NewGuid() + Path.GetExtension(file.FileName); var path = Path.Combine(Server.MapPath("~/ScanDocuments/"), fileName); file.SaveAs(path); fileType = file.ContentType; // Save Data // TempData["SuccessMsg"] = "Document Updated."; // return RedirectToAction("Index"); } docModel.DocumentId = mod.DocumentID; docModel.ContractId = ContractID; docModel.MerchantId = CurrentMerchantID; docModel.DocumentTypeId = mod.DocumentTypeID; docModel.FileName = fileName; docModel.FileDetails = fileType; docModel.UploadUserId = CurrentUserID; if (mod.IsPending) { docModel.StatusId = (long)StatusTypes.DocPending; } else { docModel.StatusId = (long)StatusTypes.DocUploaded; } documentsApi.UpdateDocuments(docModel); } //var model = new ScanDocumentModel(); //mod.DocumentTypes = GetDocTypes(); //return View("ScanDocument", mod); }
public ActionResult Index() { var model = new ScanDocumentModel(); model.DocumentTypes = GetDocTypes(); return View(model); }