コード例 #1
0
 public IActionResult CreateShipmentComment(ShipmentCommentInsert shipmentcomment)
 {
     try
     {
         return(new JsonResult(ShipmentBAL.CreateShipmentComment(shipmentcomment)));
     }
     catch (Exception ex)
     {
         return(StatusCode(StatusCodes.Status500InternalServerError, "Failed to create Shipment Comment"));
     }
 }
コード例 #2
0
ファイル: ShipmentDAL.cs プロジェクト: alonzoalden/freight
        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);
            }
        }
コード例 #3
0
ファイル: ShipmentBAL.cs プロジェクト: alonzoalden/freight
 public ShipmentComment CreateShipmentComment(ShipmentCommentInsert shipmentcomment)
 {
     return(ShipmentDAL.CreateShipmentComment(shipmentcomment));
 }