public bool EditOut(string id, string no, string content) { try { SyllabusOutcome outedit = db.SyllabusOutcomes.Where(edit => edit.id == id).Single(); outedit.OutcomeNo = no; outedit.OutcomeContent = content; db.SubmitChanges(); return(true); } catch { return(false); } }
public bool DelOut(string id) { try { SyllabusOutcome outdel = db.SyllabusOutcomes.Where(del => del.id == id).Single(); mapz.DelMapfromSyOut(id); db.SyllabusOutcomes.DeleteOnSubmit(outdel); db.SubmitChanges(); return(true); } catch { return(false); } }
public bool AddOut(string ids, string no, string content) { try { SyllabusOutcome outadd = new SyllabusOutcome(); currentID = createID(); outadd.id = currentID; outadd.idSyllabus = ids; outadd.OutcomeNo = no; outadd.OutcomeContent = content; mapz.AddMap(ids, currentID, ""); db.SyllabusOutcomes.InsertOnSubmit(outadd); db.SubmitChanges(); return(true); } catch { return(false); } }