예제 #1
0
        public ProductMaterialsOrderInsert InsertMaterialsOrder(ProductMaterialsOrderInsert productMaterialsOrderInsert)
        {
            using (SqlConnection connection = new SqlConnection(connectionString))
            {
                using (SqlCommand command = new SqlCommand("ProcedureInsertProductsMaterialsOrder", connection))
                {
                    command.CommandType = CommandType.StoredProcedure;

                    command.Parameters.AddWithValue("@ProductMaterialOrderID", productMaterialsOrderInsert.MaterialID);

                    connection.Open();
                    command.ExecuteNonQuery();
                }

                return(productMaterialsOrderInsert);
            }
        }
예제 #2
0
 //[Consumes("application/json")]
 public IActionResult Post([FromBody] ProductMaterialsOrderInsert productMaterialsOrderInsert)
 {
     return(Ok(new ProductMaterialsOrderDataLayer(_configuration).InsertMaterialsOrder(productMaterialsOrderInsert)));
 }