public async Task <IActionResult> PutSamplingUFTDetail([FromRoute] long RSubAppraisalID, [FromQuery] long RAppraisalID, [FromQuery] string CIFName, [FromQuery] string AANo, [FromQuery] string RoomNo, [FromQuery] string BuildingNo, [FromQuery] string RegisterNumber, [FromQuery] string FloorNoCondo, [FromQuery] string PositionLatitude, [FromQuery] string PositionLongtitude, [FromQuery] bool chkconstruction) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } try { using (var context = new DBCams3context()) { var getDataUpdate = (from updateData in context.SamplingUFTDetail where updateData.RSubAppraisalID == RSubAppraisalID select updateData).FirstOrDefault(); if (getDataUpdate != null) { getDataUpdate.RSubAppraisalID = RSubAppraisalID; getDataUpdate.RAppraisalID = RAppraisalID; getDataUpdate.CIFName = CIFName; getDataUpdate.AANo = AANo; getDataUpdate.RoomNo = RoomNo; getDataUpdate.BuildingNo = BuildingNo; getDataUpdate.RegisterNumber = RegisterNumber; getDataUpdate.FloorNoCondo = FloorNoCondo; getDataUpdate.PositionLatitude = PositionLatitude; getDataUpdate.PositionLongtitude = PositionLongtitude; getDataUpdate.chkconstruction = chkconstruction; } else { return(Ok(EnumMessage.StatusMessage.Error.NotFoundUpdate)); } _context.Update(getDataUpdate); await _context.SaveChangesAsync(); return(Ok(EnumMessage.StatusMessage.Success.DataSaveChange)); } } catch (DbUpdateConcurrencyException) { if (!SamplingUFTDetailExists(RSubAppraisalID)) { return(NotFound()); } else { throw; } } }
public SamplingLBFTDetailsController(DBCams3context context) { _context = context; }
public SamplingworkLTFController(DBCams3context context) { _context = context; }
public SamplingProjectViewController(DBCams3context context) { _context = context; }
public SamplingworkFTMainController(DBCams3context context) { _context = context; }
public AppraisalsController(DBCams3context context) { _context = context; }
public RAppraisalInfoesController(DBCams3context context) { _context = context; }