public List<WaldenCompleteFaxWeb.Models.Document> GetDocumentList() { List<WaldenCompleteFaxWeb.Models.Document> faxList = new List<WaldenCompleteFaxWeb.Models.Document>(); WaldenCompleteFaxWeb.Models.Document faxName; try { DirectoryInfo _directory = new DirectoryInfo(Walden.CompleteFax.Library.Database.TemporaryFaxPath + GetUserName() + "\\"); FileInfo[] _files = _directory.GetFiles("*.pdf"); var repository = new FaxSendTo(); foreach (FileInfo _file in _files) { faxName = new WaldenCompleteFaxWeb.Models.Document(); faxName.document = _file.Name; faxName.useDocument = 0; faxList.Add(faxName); } return faxList; } catch { return faxList; } }
public JsonResult RemoteData() { var repository = new FaxSendTo(); var data = repository.GetAllFaxInformation(); return Json(data, JsonRequestBehavior.AllowGet); }