Exemplo n.º 1
0
        public ActionResult SaveFilePerson(int PersonID, int FileID, string Description)
        {
            PersonGeneral person = mappingController.personListData.personList.Find(item => item.ID == PersonID);

            if (person != null)
            {
                person.attachFileList.Load();
                AttachFilePerson atp = person.attachFileList.Find(item => item.ID == FileID);
                if (atp != null)
                {
                    atp.Description = Description;
                    atp.Save();
                }
            }
            return(Json(""));
        }
Exemplo n.º 2
0
        public ActionResult UploadFileToPerson(int PersonID, List <AttachFileTransferData> data)
        {
            PersonGeneral person = mappingController.personListData.personList.Find(item => item.ID == PersonID);

            if ((person != null) && (data != null))
            {
                person.attachFileList.Load();
                foreach (var item in data)
                {
                    AttachFilePerson atp = person.attachFileList.Create();
                    item.FillData(atp);
                    atp.Save();
                }
            }
            return(Json(""));
        }