public void DeleteUploadDocuments(UploadDocuments uploadDocuments) { if (uploadDocuments == null) { throw new ArgumentNullException(nameof(uploadDocuments)); } _context.UploadDocuments.Remove(uploadDocuments); }
public void CreateUploadDocuments( UploadDocuments uploadDocuments) { if (uploadDocuments == null) { throw new ArgumentNullException(nameof(uploadDocuments)); } //foreach(UploadDocuments edu in uploadDocuments) //{ _context.UploadDocuments.Add(uploadDocuments); //} }
public void FillUploadDocuments(UploadDocuments data) { var directory = HelpMethods.GetDirectory(); var path = Path.GetFullPath(Path.Combine(directory, @"..\Logs\" + CRMConstants.UploadFile)); var count = this.FilesCount; var uploadedCount = 0; while (uploadedCount < count) { Thread.Sleep(500); this.Driver.FindElement(By.XPath("//input[@type='file']")).SendKeys(path); Thread.Sleep(500); this.Upload.Click(); Thread.Sleep(1000); uploadedCount = this.UploadedFilesCount; } }
public OutUploadDocuments GetUploadDocuments(string documentID) { string connectionString = DataBaseHelper.GetConnectionString("DLG"); OutUploadDocuments response = new OutUploadDocuments(); var ora = new OracleServer(connectionString); UploadDocuments document; List <UploadDocuments> list = new List <UploadDocuments>(); string command = string.Empty; try { command = " SELECT BBS_PORTAL_LOG_IMG.CONSECUTIVO, BBS_PORTAL_LOG_IMG.DESCRIPCION_DOCUMENTO, BBS_PORTAL_LOG_IMG.NOMBRE_DOCUMENTO_CARGADO, "; command = string.Format("{0} BBS_PORTAL_LOG_IMG.YEAR, BBS_PORTAL_LOG_IMG.MONTH FROM BBS_PORTAL_LOG_IMG WHERE ", command); command = string.Format("{0} BBS_PORTAL_LOG_IMG.NUMERO_CEDULA = '{1}' ORDER BY BBS_PORTAL_LOG_IMG.CONSECUTIVO DESC ", command, documentID); var rdr = ora.ExecuteCommand(command); while (rdr.Read()) { document = new UploadDocuments(); document.Consecutive = DBNull.Value.Equals(rdr["CONSECUTIVO"]) ? 0 : double.Parse(rdr["CONSECUTIVO"].ToString()); document.Description = DBNull.Value.Equals(rdr["DESCRIPCION_DOCUMENTO"]) ? string.Empty : rdr["DESCRIPCION_DOCUMENTO"].ToString(); document.Name = DBNull.Value.Equals(rdr["NOMBRE_DOCUMENTO_CARGADO"]) ? string.Empty : rdr["NOMBRE_DOCUMENTO_CARGADO"].ToString(); document.Year = DBNull.Value.Equals(rdr["YEAR"]) ? 0 : int.Parse(rdr["YEAR"].ToString()); document.Month = DBNull.Value.Equals(rdr["MONTH"]) ?0 : int.Parse(rdr["MONTH"].ToString()); list.Add(document); } rdr.Close(); response.lstUploadDocuments = list; response.msg = new Response(); response.msg.errorCode = "200"; response.msg.errorMessage = "OK"; } catch (Exception ex) { throw new Exception("DocumentsDAO.GetUploadDocuments", ex); } finally { ora.Dispose(); } return(response); }
public ActionResult UpdateUploadDocuments(int id, IEnumerable <UploadDocumentsUpdateDto> uploadDocumentsUpdateDto) { foreach (var uploadDocumentsUpdate in uploadDocumentsUpdateDto) { UploadDocuments previousEmployerModelFromRepo = _repository.GetUploadDocumentsById(uploadDocumentsUpdate.UploadDocumentId); if (previousEmployerModelFromRepo == null) { return(NotFound()); } _mapper.Map(uploadDocumentsUpdate, previousEmployerModelFromRepo); _repository.UpdateUploadDocuments(previousEmployerModelFromRepo); _repository.SaveChanges(); } return(NoContent()); }
public void UpdateUploadDocuments(UploadDocuments uploadDocuments) { //Nothing }