public JsonResult Upload() { foreach (string file in Request.Files) { var upload = Request.Files[file]; if (upload != null) { FileServiceReference.FileServiceClient client = new FileServiceReference.FileServiceClient(); DocumentDTO doc = new DocumentDTO(); string fileName = System.IO.Path.GetFileName(upload.FileName); // сохраняем файл в папку Files в проекте //upload.SaveAs(Server.MapPath("~/Files/" + fileName)); MemoryStream target = new MemoryStream(); upload.InputStream.CopyTo(target); byte[] data = target.ToArray(); doc.Content = data; doc.CreateDate = DateTime.Now; doc.FileName = fileName; doc.FileId = Guid.NewGuid(); doc.MimeType = upload.ContentType; doc.UserName = User.Identity.GetUserName(); doc.UserId = new Guid(User.Identity.GetUserId()); doc.FileSize = Decimal.Divide(doc.Content.Length, 1048576); //doc.FileSize = doc.Content.Length / 1048576; doc.FileNameInFileStorage = doc.FileId.ToString(); doc.Description = "example"; client.InsertFile(doc); } } return(Json("файл загружен")); }
public async Task Edit(DocumentDTO documentDTO) { var document = _context.Documents .FirstOrDefault(d => d.Id == documentDTO.Id); var client = SetClient(documentDTO.Client); var contract = SetContract(documentDTO.Contract); var device = SetDevice(documentDTO.Device); var methodic = SetMethodic(documentDTO.Device.VerificationMethodic); document.Client = client; document.Contract = contract; document.Device = device; document.Device.VerificationMethodic = methodic; document.Device.RegistrationNumber = documentDTO.Device.RegistrationNumber; document.Device.Type = documentDTO.Device.Type; document.DocumentNumber = documentDTO.DocumentNumber; document.UpdatedBy = documentDTO.UpdatedBy; document.UpdatedOn = documentDTO.UpdatedOn; try { _context.Update(document); await _context.SaveChangesAsync(); } catch (Exception e) { Console.WriteLine(e.Message); } }
private void btnDownload_Click(object sender, EventArgs e) { FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog(); if (folderBrowserDialog.ShowDialog() == DialogResult.OK) { try { BankAccountDTO bankAccountDTO = GetSelectedBankDetailFromUI(); //download address Proof DocumentDTO address = _bankAccountFunctions.ViewAccountDocument(bankAccountDTO.AddressProofDocumentId); string addressFP = $@"{folderBrowserDialog.SelectedPath}\{bankAccountDTO.FirstName}_{bankAccountDTO.LastName}_address_document{address.Extension}"; byte[] addressByte = Convert.FromBase64String(address.HexString); System.IO.File.WriteAllBytes(addressFP.Replace(" ", ""), addressByte); DocumentDTO identity = _bankAccountFunctions.ViewAccountDocument(bankAccountDTO.IdentificationProofDocumentId); string identityFP = $@"{folderBrowserDialog.SelectedPath}\{bankAccountDTO.FirstName}_{bankAccountDTO.LastName}_identity_Document{identity.Extension}"; byte[] identityByte = Convert.FromBase64String(identity.HexString); System.IO.File.WriteAllBytes(identityFP.Replace(" ", ""), identityByte); MessageBox.Show("Download Success"); } catch (Exception ex) { MessageBox.Show($"Download Failed : \n {ex.GetBaseException().Message}"); } } }
public void DeleteDocument(DocumentDTO dto) { Document d = null; var documents = dao.GetAllDocuments(); var documentToDelete = documents.Where(x => x.Name.ToUpper() == dto.Name.ToUpper()); if (!documentToDelete.Any()) { throw new DocumentExceptions.DocumentNotFoundException("Nie ma takiego dokumentu"); } if (documentToDelete.Count() > 1) { var documentEntity = documentToDelete.FirstOrDefault(x => x.Content == dto.Content); d = documentEntity ?? throw new DocumentExceptions.DocumentNotFoundException("Nie ma takiego pracownika"); } else { d = documentToDelete.First(); } dao.DeleteDocument(d); }
/// <summary> /// 产品线 /// </summary> public RootNode ProductLine(DocumentDTO dto) { var token = dto.UserInfo; string sql = null; if (token.UserType == 2) { sql = "SELECT master_ProductLine.ProductLineID, master_ProductLine.DepartID, master_ProductLine.ProductLineName, master_DepartmentInfo.DepartName FROM master_ProductLine INNER JOIN master_DepartmentInfo ON master_ProductLine.DepartID = master_DepartmentInfo.DepartID where master_ProductLine.IsActive=1 " + string.Format(" and master_ProductLine.ProductLineID in ({0})", string.Join(",", token.ProductLineIDs)); } else { sql = "SELECT master_ProductLine.ProductLineID, master_ProductLine.DepartID, master_ProductLine.ProductLineName, master_DepartmentInfo.DepartName FROM master_ProductLine INNER JOIN master_DepartmentInfo ON master_ProductLine.DepartID = master_DepartmentInfo.DepartID where master_ProductLine.IsActive=1"; } var productLines = masterdata.Database.SqlQuery <ProductLineResultDTO>(sql); RootNode root = new RootNode { children = new List <DepartNode>() }; productLines.GroupBy(p => p.DepartID).ToList().ForEach(group => { var first = group.First(); var departNode = new DepartNode { id = first.DepartID, text = first.DepartName, children = new List <ProductLineNode>() }; departNode.children.AddRange(group.Select(p => new ProductLineNode { id = p.ProductLineID, DepartID = p.DepartID, DepartName = p.DepartName, ProductLineID = p.ProductLineID, text = p.ProductLineName })); root.children.Add(departNode); }); return(root); }
public async Task <DocumentDTO> CreateAsync(DocumentDTO dto) { if (dto.File == null) { throw new EmptyDocumentException(); } string contentType; if (dto.File.Length > _options.MaximumSize) { throw new WrongDocumentSizeException(); } contentType = MimeType.GetMimeType(dto.File.OpenReadStream()); if (contentType != "application/pdf") { throw new DocumentContentException(); } dto.ContentType = contentType; dto.Path = _storageLogger.Create(dto.File); var model = _mapper.Map <Document>(dto); await _unitOfWork.DocumentRepository.AddAsync(model); await _unitOfWork.SaveAsync(); return(_mapper.Map <DocumentDTO>(model)); }
public ActionResult Create(DocumentDTO DocEntity, InternalDocDTO intDocEntity, string dfGUID) { DocEntity.docContentType = (int)Enums.ContentTypes.InternalDoc; long docID = doc.Insert(DocEntity); intDocEntity.docID = docID; new InternalDocService().Insert(intDocEntity); new AttachFileTypeService().UpdateDocID(docID, dfGUID); OperationToDoc_DTO optodocItem = new Srv_OperationToDoc().GetOperationToDocByPosID(1, DocEntity.docContentType); new DocOperationService().Insert(new DocumentOperationDTO { docID = docID, userID = Convert.ToInt32(Session["userID"]), fromUserID = Convert.ToInt32(Session["userID"]), operationID = optodocItem.fromid, operationPos = optodocItem.positionid, opercode = optodocItem.opercode, isActionConfirmed = 1, doDate = DocEntity.docRegDate, docDayCount = DocEntity.docDayCount, docFinishDate = DocEntity.docFinishDate }); return(RedirectToAction("Index", "Document")); }
private void ZapiszDokumentBTN_Click(object sender, RoutedEventArgs e) { var nazwa = UsuwanyNazwa.Text; var tresc = UsuwanyTresc.Text; var dto = new DocumentDTO() { Name = nazwa, Content = tresc }; try { manager.DeleteDocument(dto); } catch (DocumentExceptions.DocumentNotFoundException exception) { MessageBox.Show(exception.Message); } finally { UsuwanyNazwa.Text = string.Empty; UsuwanyTresc.Text = string.Empty; } }
public long Insert(DocumentDTO entity) { document.AddOutputParameters("@id", entity.docID); document.AddInputParameters("@docContentType", entity.docContentType); document.AddInputParameters("@docRegNo", entity.docRegNo); if (entity.docRegDate == null) { entity.docRegDate = DateTime.Now.ToString("dd/MM/yyyy"); } document.AddInputParameters("@docRegDate", DateTime.ParseExact(entity.docRegDate, "dd/MM/yyyy", CultureInfo.InvariantCulture).ToString("MM/dd/yyyy", CultureInfo.InvariantCulture)); document.AddInputParameters("@docDayCount", entity.docDayCount); if (entity.docFinishDate == null) { entity.docFinishDate = DateTime.Now.ToString("dd/MM/yyyy"); } document.AddInputParameters("@docFinishDate", DateTime.ParseExact(entity.docFinishDate, "dd/MM/yyyy", CultureInfo.InvariantCulture).ToString("MM/dd/yyyy", CultureInfo.InvariantCulture)); document.AddInputParameters("@docType", entity.docType); document.AddInputParameters("@docContent", entity.docContent); document.AddInputParameters("@docNote", entity.docNote); document.AddInputParameters("@docInCharge", entity.docInCharge); document.AddInputParameters("@belongToDoc", entity.belongToDoc); document.IUD("sp_Document_Insert", CommandType.StoredProcedure); return(Convert.ToInt64(document.GetParamValue("@id"))); }
public List <DocumentDTO> GetFileListFromDB(Guid UserId) { List <DocumentDTO> list = new List <DocumentDTO>(); string connectionString = ConfigurationManager.ConnectionStrings["FileService"].ConnectionString; using (SqlConnection connection = new SqlConnection(connectionString)) { connection.Open(); SqlCommand command = new SqlCommand(); command.Connection = connection; command.CommandText = @"SELECT FileName, Description, FileSize, CreateDate, FileId FROM FileTable WHERE UserId=@UserId"; SqlParameter guiParam = new SqlParameter("@UserId", UserId); command.Parameters.Add(guiParam); SqlDataReader reader = command.ExecuteReader(); if (reader.HasRows) { while (reader.Read()) { DocumentDTO document = new DocumentDTO(); document.FileName = reader.GetValue(0).ToString(); document.Description = reader.GetValue(1).ToString(); // document.FileSize = (Decimal)reader.GetValue(2); document.FileSize = reader.GetDecimal(2); //document.CreateDate = (DateTime)reader.GetValue(3); document.CreateDate = reader.GetDateTime(3); //document.FileId = (Guid)reader.GetValue(4); document.FileId = reader.GetGuid(4); list.Add(document); } } reader.Close(); } return(list); }
public DocumentResponse DocumentGet(DocumentRequest request) { try { DocumentDTO result = null; NullSafeCheck(request, "DocumentRequest"); NullSafeCheck(request.Filter, "Filter"); if (request.Filter.ID <= 0) { throw new ArgumentException($"DocumentID is not valid '{request.Filter.ID}'"); } using (var context = new CharityEntities()) { var document = context.Documents.AsNoTracking().FirstOrDefault(d => d.ID == request.Filter.ID); result = DocumentDTOMapper.Invoke(document); } return(new DocumentResponse { Success = true, Result = result }); } catch (Exception ex) { var response = ExceptionToBaseResponse(ex); return(response.Cast <DocumentResponse>()); } }
//public JsonResult FillOperationDDL(int id) //{ // DocContentTypeService docConTypeServ = new DocContentTypeService(); // return Json(docConTypeServ.GetListByID(id), JsonRequestBehavior.AllowGet); //} public ActionResult GetAboutDocument(long docID) { DocumentDTO data = document.GetDocumentByDocID(docID); ViewBag.DocumentAbout = data; return(PartialView("_GetAboutDocument"));; }
public static SqlCommand SqlCommandBuilder(SqlConnection connection, DocumentDTO document, Decimal FileSize) { SqlCommand command = new SqlCommand(); command.Connection = connection; command.CommandText = @"INSERT INTO FileTable VALUES (@FileId, @UserId, @UserName, @FileName, @FileNameInFileStorage, @MimeType, @Description, @Content, @FileSize, @CreateDate)"; command.Parameters.AddWithValue("@FileId", document.FileId); command.Parameters.AddWithValue("@UserId", document.UserId); command.Parameters.AddWithValue("@UserName", document.UserName); command.Parameters.AddWithValue("@FileName", document.FileName); if (document.Content.Length > Int32.Parse(ConfigurationManager.AppSettings["fileSize"])) { command.Parameters.AddWithValue("@FileNameInFileStorage", document.FileNameInFileStorage); command.Parameters.Add("@Content", SqlDbType.VarBinary, -1); command.Parameters["@Content"].Value = DBNull.Value; } else { command.Parameters.AddWithValue("@FileNameInFileStorage", document.FileNameInFileStorage).Value = DBNull.Value; command.Parameters.AddWithValue("@Content", document.Content); } command.Parameters.AddWithValue("@MimeType", document.MimeType); command.Parameters.AddWithValue("@Description", document.Description); command.Parameters.AddWithValue("@FileSize", document.FileSize = FileSize); command.Parameters.AddWithValue("@CreateDate", document.CreateDate); return(command); }
public async System.Threading.Tasks.Task <ActionResult> Download(Guid id) { WebRequest request = WebRequest.Create("https://localhost:44385/Home/GetFile?Id=" + id); WebResponse response = await request.GetResponseAsync(); string result; using (Stream stream = response.GetResponseStream()) { using (StreamReader reader = new StreamReader(stream)) { result = reader.ReadToEnd(); } } string trans = JsonConvert.DeserializeObject <string>(result); DocumentDTO document = JsonConvert.DeserializeObject <DocumentDTO>(trans); Response.Clear(); Response.AddHeader("Content-Disposition", "attachment; filename=" + document.FileName); Response.AddHeader("Content-Length", document.Content.Length.ToString()); Response.ContentType = "application/octet-stream"; Response.OutputStream.Write(document.Content, 0, document.Content.Length); Response.End(); return(RedirectToRoute(new { controller = "Home", action = "UserPage" })); }
/// <summary> /// Create Invoice For Closure Charge and Auction Invoicing /// </summary> private void CreateInvoice(string type) { var tasks = new List <Task <ResultDTO> >(); var results = new List <string>(); //try { LogService.WriteInfo("Begin Mass Billing " + type); DraftService lObjDraftService = new DraftService(); lObjDraftService.DeleteDrafts(type); foreach (var doc in pendingInvoices) { // tasks.Add(Task.Run(() => { try { LogService.WriteInfo("Begin Creating Invoice for Cient: " + doc.Code); var invoice = new DocumentDTO(); invoice.Document = doc; invoice.FloorServiceLines = massInvoicingDAO.GetFloorServiceLines(doc.Code, user.WhsCode, type); invoice.DeliveryLines = massInvoicingDAO.GetDeliveryLines(doc.Code, user.WhsCode); //invoice.FloorServiceLines = massInvoicingDAO.GetFloorServiceLines(doc.Code, "CRHE", type); //invoice.DeliveryLines = massInvoicingDAO.GetDeliveryLines(doc.Code, "CRHE"); if (invoice.FloorServiceLines.Count == 0 && invoice.DeliveryLines.Count == 0) { results.Add("Sin servicio de piso ni entregas de alimento"); } else { results.Add(InvoiceDI.CreateInvoice(invoice, user, floorServiceItem, type).Message); } LogService.WriteInfo("Successfully Creating Invoice for Cient: " + doc.Code); // })); //Thread.Sleep(130); } catch (Exception ex) { HandleException(ex, "[Exception] Invoice for Client " + doc.Code); } //Task.WaitAll(tasks.ToArray()); } //catch(AggregateException ae) { // ae.Handle(e => { // HandleException(e, "(Closure)"); // return true; // }); //} //catch(Exception ex) { // HandleException(ex, "(Closure)"); //} Task.Factory.StartNew(() => { // BindResultColumn(tasks.Select(t => t.Result.Message).AsParallel().AsOrdered().ToList(), type); BindResultColumn(results, type); LogService.WriteInfo("Done Mass Billing " + type); }); UIApplication.ShowMessageBox("Revisar la Columna de Resultados"); }
//Delete document by id and file path public static bool Delete(int Id, string FilePath) { bool IsDeleted = false; try { DocumentDTO DocumentDTO = new DocumentDTO(); DocumentDTO = GetById(Id); GlobalSettings.LoggedInClientId = DocumentDTO.ClientId; GlobalSettings.LoggedInUserId = DocumentDTO.UserId; int PartnerId = ClientService.GetById(DocumentDTO.ClientId).PartnerId; GlobalSettings.LoggedInPartnerId = PartnerId; IsDeleted = CommonService.RemoveDocument(FilePath); //+ DocumentDTO.Path if (IsDeleted != false) { UnitOfWork uow = new UnitOfWork(); uow.DocumentRepo.Delete(Id); uow.SaveChanges(); } return(IsDeleted); } catch { throw; } }
//Create document public static int Create(DocumentDTO DocumentDTO) { try { GlobalSettings.LoggedInClientId = DocumentDTO.ClientId; GlobalSettings.LoggedInUserId = DocumentDTO.UserId; int PartnerId = ClientService.GetById(DocumentDTO.ClientId).PartnerId; GlobalSettings.LoggedInPartnerId = PartnerId; var Document = new Document(); using (var uow = new UnitOfWork()) { Document = Transform.DocumentToDomain(DocumentDTO); uow.DocumentRepo.Insert(Document); uow.SaveChanges(); return(Document.Id); } } //catch (LoggedInUserException) //{ // throw new System.TimeoutException(); //} catch (Exception) { throw; } }
public JsonResult Upload() { string result = ""; try { foreach (string file in Request.Files) { var upload = Request.Files[file]; if (upload != null) { DocumentDTO doc = new DocumentDTO(); string fileName = System.IO.Path.GetFileName(upload.FileName); // сохраняем файл в папку Files в проекте //upload.SaveAs(Server.MapPath("~/Files/" + fileName)); MemoryStream target = new MemoryStream(); upload.InputStream.CopyTo(target); byte[] data = target.ToArray(); doc.Content = data; doc.CreateDate = DateTime.Now; doc.FileName = fileName; doc.FileId = Guid.NewGuid(); doc.MimeType = upload.ContentType; doc.UserName = User.Identity.GetUserName(); doc.UserId = new Guid(User.Identity.GetUserId()); doc.FileSize = Decimal.Divide(doc.Content.Length, 1048576); //doc.FileSize = doc.Content.Length / 1048576; doc.FileNameInFileStorage = doc.FileId.ToString(); doc.Description = "example"; // client.InsertFile(doc); string json = JsonConvert.SerializeObject(doc); var httpRequest = (HttpWebRequest)WebRequest.Create("https://localhost:44385/Home/InsertFile"); httpRequest.Method = "POST"; httpRequest.ContentType = "application/json"; using (var requestStream = httpRequest.GetRequestStream()) using (var writer = new StreamWriter(requestStream)) { writer.Write(json); } using (var httpResponse = httpRequest.GetResponse()) { using (Stream stream = httpResponse.GetResponseStream()) { using (StreamReader reader = new StreamReader(stream)) { result = reader.ReadToEnd(); } } } } } } catch (Exception ex) { return(Json(ex.Message)); } return(Json(result)); }
public static DocumentDTO getInstance() { if (documentDTO == null) { documentDTO = new DocumentDTOImplementation(); } return(documentDTO); }
public void Create(DocumentDTO documentDTO) { DocumentMaster obj = _mapper.Map <DocumentMaster>(documentDTO); obj.CreatedDate = DateTime.Now; _unitOfWork.DocumentMaster.Create(obj); _unitOfWork.SaveChanges(); }
public async Task EditDocument(Guid tenderGuid, DocumentDTO documentDTO) { var document = await Context.TenderDocuments .FirstOrDefaultAsync(m => m.Tender.Guid == tenderGuid && m.StringId == documentDTO.StringId); Context.Entry(document).CurrentValues.SetValues(documentDTO); await Context.SaveChangesAsync(); }
public void UpdateDocument(Document document, DocumentDTO documentDTO) { Domain.Document updateDocument = _context.Documents.FirstOrDefault(d => d.Id == document.Id); updateDocument.Name = documentDTO.Name; updateDocument.Link = documentDTO.Link; _context.SaveChanges(); }
public Document(DocumentDTO doc) : this() { this.name = doc.Name; this.owner = doc.Owner; this.description = doc.Description; this.creationDate = doc.CreationDate; this.meta = new Metadata(doc.Metadata); }
public async Task AddDocument(Guid tenderGuid, DocumentDTO tenderDocumentDTO) { throw new NotImplementedException(); //var tender = await Context.Tenders.FirstOrDefaultAsync(m => m.Guid == tenderGuid); //var mapper = new TenderDocumentMapper(); //var tenderDocument = mapper.Map(tenderDocumentDTO); //tender.Documents.Add(tenderDocument); //await Context.SaveChangesAsync(); }
public async Task <DocumentDTO> UpdateAsync(DocumentDTO dto) { var model = _mapper.Map <Document>(dto); _unitOfWork.DocumentRepository.Update(model); await _unitOfWork.SaveAsync(); return(_mapper.Map <DocumentDTO>(model)); }
public virtual ActionResult UploadDocument(int AccessCode) { DocumentDTO uploadedFile = GetSingleUploadedFile(); ServiceResponse serviceResponse = _documentService.AddDocument(uploadedFile.DocumentName, uploadedFile.FileContents, uploadedFile.ContentType, AccessCode); return(Json(serviceResponse)); }
public long SaveDocument(DocumentDTO documentDTO, string userId) { long documentId = 0; if (documentDTO.DocumentId == 0) { var document = new Document() { Name = documentDTO.Name, UserId = documentDTO.UserId, DocumentCategoryId = documentDTO.DocumentCategoryId, Amount = documentDTO.Amount, ItemId = documentDTO.ItemId, BranchId = documentDTO.BranchId, Description = documentDTO.Description, Quantity = documentDTO.Quantity, DocumentNumber = documentDTO.DocumentNumber, CreatedOn = DateTime.Now, TimeStamp = DateTime.Now, CreatedBy = userId, Deleted = false, }; this.UnitOfWork.Get <Document>().AddNew(document); this.UnitOfWork.SaveChanges(); documentId = document.DocumentId; return(documentId); } else { var result = this.UnitOfWork.Get <Document>().AsQueryable() .FirstOrDefault(e => e.DocumentId == documentDTO.DocumentId); if (result != null) { result.Name = documentDTO.Name; result.DocumentNumber = documentDTO.DocumentNumber; result.Description = documentDTO.Description; result.DocumentCategoryId = documentDTO.DocumentCategoryId; result.Amount = documentDTO.Amount; result.Quantity = documentDTO.Quantity; result.ItemId = documentDTO.ItemId; result.BranchId = documentDTO.BranchId; result.UserId = documentDTO.UserId; result.UpdatedBy = userId; result.TimeStamp = DateTime.Now; result.Deleted = documentDTO.Deleted; result.DeletedBy = documentDTO.DeletedBy; result.DeletedOn = documentDTO.DeletedOn; this.UnitOfWork.Get <Document>().Update(result); this.UnitOfWork.SaveChanges(); } return(documentDTO.DocumentId); } }
public ActionResult RenameTag(int tagID, string tagName) { UserLoginDTO lng = Session["UserLoginInfo"] as UserLoginDTO; DocumentDTO dto = new DocumentDTO { UserInfo = lng.UserInfo() }; var result = _LssService.RenameTag(tagID, tagName); return(new JsonResult(result)); }
public ActionResult DeleteTag(int tagID) { UserLoginDTO lng = Session["UserLoginInfo"] as UserLoginDTO; DocumentDTO dto = new DocumentDTO { UserInfo = lng.UserInfo() }; var result = _LssService.DeleteTag(tagID); return(new JsonResult(result)); }
public int AddNewDocument(DocumentDTO documentDTO) { using (IDbConnection connection = new SQLiteConnection(_connectionString)) { string insertQuery = $@"INSERT INTO Document (HexString,Extension,IsDeleted) VALUES ('{documentDTO.HexString}','{documentDTO.Extension}',0) ; SELECT last_insert_rowid();"; return(connection.QueryFirstOrDefault <int>(insertQuery)); } }
private void btnDocuDown_Click(object sender, RoutedEventArgs e) { //Select SharePoint Document DownLoad if (gvDocument.SelectedItems.Count == 0) WinAppLibrary.Utilities.Helper.SimpleMessage("Please select Document", "Caution!"); else { if (!login) SharePointLogin(); try { //if (login) //{ List<DailytoolboxDTO> dtolist = new List<DailytoolboxDTO>(); foreach (DataItem item in gvDocument.SelectedItems) { //DownloadDocument(item.LocationURL, item.Description); DownloadDocument(item.ImagePath, item.Content); if (_isitemtrue == false) { DocumentDTO newitem = new DocumentDTO(); DailytoolboxDTO dto = new DailytoolboxDTO(); dto.DailyBrassID = _dailybassid; // 67; _dailybassid; dto.DocumentName = item.Content; dto.DocumentVersion = ""; dto.SPCollectionID = Convert.ToInt32(item.UniqueId); dto.DTOStatus = (int)WinAppLibrary.Utilities.RowStatus.New; _dailytoolboxdto.Add(dto); } } if (_dailytoolboxdto.Count > 0 && _isitemtrue == false) SaveDailyToolBoxTalk(_dailytoolboxdto); WinAppLibrary.Utilities.Helper.SimpleMessage("Download Complete", "Success"); //} //else // WinAppLibrary.Utilities.Helper.SimpleMessage("SharePoint Login Fail", "Caution!"); } catch (Exception ex) { (new WinAppLibrary.Utilities.Helper()).ExceptionHandler(ex, "DownloadDocument"); } } }
public void AddToDocuments(DocumentDTO documentDTO) { base.AddObject("Documents", documentDTO); }
public static DocumentDTO CreateDocumentDTO(global::System.Guid documentId, int documentTypeId, bool isValid, global::System.DateTime createTime, global::System.DateTime updateTime) { DocumentDTO documentDTO = new DocumentDTO(); documentDTO.DocumentId = documentId; documentDTO.DocumentTypeId = documentTypeId; documentDTO.IsValid = isValid; documentDTO.CreateTime = createTime; documentDTO.UpdateTime = updateTime; return documentDTO; }