public int Add(ContractNotice contractNoticeModel) { string insertQuery = @"INSERT INTO [dbo].[ContractNotice] ( ContractNoticeGuid , NoticeType , IssuedDate , LastUpdatedDate , ResourceGuid , Resolution , NoticeDescription, UpdatedBy ) VALUES ( @ContractNoticeGuid , @NoticeType , @IssuedDate , @LastUpdatedDate , @ResourceGuid , @Resolution , @NoticeDescription, @UpdatedBy )"; return(_context.Connection.Execute(insertQuery, contractNoticeModel)); }
public IActionResult Edit([FromBody] ContractNoticeViewModel contractNoticeModel) { List <string> filePath = new List <string>(); Guid id = Guid.NewGuid(); ContractNotice model = new ContractNotice(); model.ContractNoticeGuid = id; model.IssuedDate = contractNoticeModel.IssuedDate; model.LastUpdatedDate = DateTime.Now; model.NoticeType = contractNoticeModel.NoticeType; model.Resolution = contractNoticeModel.Resolution; model.ResourceGuid = contractNoticeModel.ContractGuid; model.NoticeDescription = contractNoticeModel.NoticeDescription; model.UpdatedBy = UserHelper.CurrentUserGuid(HttpContext); var data = _contractNoticeService.GetParentId(ContractResourceFileKey.RFI.ToString(), model.ResourceGuid); _contractNoticeService.Add(model); return(Ok(new { status = ResponseStatus.success.ToString(), message = "Successfully Added !!", istriggered = false, contractGuid = contractNoticeModel.ContractGuid, resourceId = contractNoticeModel.ContractGuid, ContentResourceGuid = id, uploadPath = data?.FilePath, parentid = data?.ContractResourceFileGuid, contractResourceFileKey = ContractResourceFileKey.RFI.ToString() })); }
public static NoticesSalesStatusEnum GetStatus(this ContractNotice instance) { return(instance.DateLimitForReceipt <= DateTime.UtcNow.AddDays(-1) ? NoticesSalesStatusEnum.AfterOpen : NoticesSalesStatusEnum.BeforeOpen); }
public int Add(ContractNotice contractNoticeModel) { return(contractNoticeRepository.Add(contractNoticeModel)); }