Exemplo n.º 1
0
 public int Update(Products aProducts)
 {
     using (SqlConnection connection = new SqlConnection(this.connection))
     {
         SqlCommand cmd = new SqlCommand("spProducts", connection);
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.Parameters.Add("@productId", SqlDbType.Int).Value = aProducts.id;
         cmd.Parameters.Add("@productName", SqlDbType.VarChar).Value = aProducts.products;
         cmd.Parameters.Add("@Type", SqlDbType.Int).Value = 1;
         connection.Open();
         result = cmd.ExecuteNonQuery();
         connection.Close();
         return result;    
     }
 }
Exemplo n.º 2
0
 public int Update(Products aProducts)
 {
     return aProductGateway.Update(aProducts);
 }
Exemplo n.º 3
0
 public int Insert(Products aProducts)
 {
     return aProductGateway.Insert(aProducts);
 }