public void SupplierEvaAnswerSave(SupplierEvaAnswer answer, string userId) { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@Id", answer.Id.ToString()), new SqlParameter("@ProjectId", answer.ProjectId.ToString()), new SqlParameter("@SupplierId", answer.SupplierId.ToString()), //new SqlParameter("@EvaSubjectId", answer.EvaSubjectId.ToString()), new SqlParameter("@Score", answer.SupplierScore.ToString()), new SqlParameter("@UserId", userId) }; db.Database.ExecuteSqlCommand("EXEC up_Supplier_SupplierEvaAnswer_S @Id,@ProjectId,@SupplierId,@EvaSubjectId,@Score,@UserId", para); }
public ActionResult Delete(int AnswerId) { SupplierEvaAnswer supplierAnswer = db.SupplierEvaAnswer.Find(AnswerId); if (supplierAnswer != null) { db.SupplierEvaAnswer.Remove(supplierAnswer); db.SaveChanges(); } return(Json("")); }