public IActionResult CreateShipmentComment(ShipmentCommentInsert shipmentcomment) { try { return(new JsonResult(ShipmentBAL.CreateShipmentComment(shipmentcomment))); } catch (Exception ex) { return(StatusCode(StatusCodes.Status500InternalServerError, "Failed to create Shipment Comment")); } }
public ShipmentComment CreateShipmentComment(ShipmentCommentInsert shipmentcomment) { using (SqlConnection connection = new SqlConnection(DefaultConnection)) { DynamicParameters p = new DynamicParameters(); p.Add("shipmentid", shipmentcomment.ShipmentID); p.Add("comment", shipmentcomment.Comment); p.Add("createdby", shipmentcomment.CreatedBy); ShipmentComment result = connection.Query <ShipmentComment>("spCreateShipmentComment", p, commandType: CommandType.StoredProcedure).Single(); return(result); } }
public ShipmentComment CreateShipmentComment(ShipmentCommentInsert shipmentcomment) { return(ShipmentDAL.CreateShipmentComment(shipmentcomment)); }