public static int Save(Entity.Inventory.StockLocationTransaction stockLocationTransaction) { int rowsAffacted = 0; using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ToString())) { using (SqlCommand cmd = new SqlCommand()) { cmd.Connection = con; cmd.CommandText = "usp_Inventory_StockLocationTransaction_Save"; cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@StockLocationId", stockLocationTransaction.StockLocationId); cmd.Parameters.AddWithValue("@EmployeeId", stockLocationTransaction.EmployeeId); if (con.State == ConnectionState.Closed) { con.Open(); } rowsAffacted = cmd.ExecuteNonQuery(); con.Close(); } } return(rowsAffacted); }
public int Save(Entity.Inventory.StockLocationTransaction StockLocationTransaction) { return(DataAccess.Inventory.StockLocationTransaction.Save(StockLocationTransaction)); }