public JsonResult DeleteQuestion(int eid, int qid) { try { tbl_Exam_QuestionsMaster abc = _EQUESTION.GetAll().Where(x => x.Exam_fkid == eid && x.Question_fkid == qid).FirstOrDefault(); _EQUESTION.Remove(abc, true); return(Json("succees", JsonRequestBehavior.AllowGet)); } catch { return(Json("failed", JsonRequestBehavior.AllowGet)); } }
public JsonResult SaveQuestion(int eid, int qid) { try { tbl_Exam_QuestionsMaster abc = new tbl_Exam_QuestionsMaster(); abc.Exam_fkid = eid; abc.Question_fkid = qid; _EQUESTION.Add(abc); return(Json("succees", JsonRequestBehavior.AllowGet)); } catch { return(Json("failed", JsonRequestBehavior.AllowGet)); } }