public static bool AddNew(HDS_ExamDetailAnswer Exda) { try { ExamSystemManagerDBEntities exMana = new ExamSystemManagerDBEntities(); exMana.AddToHDS_ExamDetailAnswer(Exda); exMana.SaveChanges(); } catch (Exception e) { errMsg = e.Message; return false; } errMsg = ""; return true; }
public static bool Update(HDS_ExamDetailAnswer Exda) { try { ExamSystemManagerDBEntities exMana = new ExamSystemManagerDBEntities(); HDS_ExamDetailAnswer obj = exMana.HDS_ExamDetailAnswer.First(temp => temp.Exda_ID == Exda.Exda_ID); obj.Exd_ID = Exda.Exd_ID; obj.Exda_Answer = Exda.Exda_Answer; exMana.SaveChanges(); } catch (Exception e) { errMsg = e.Message; return false; } errMsg = ""; return true; }
/// <summary> /// Deprecated Method for adding a new object to the HDS_ExamDetailAnswer EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToHDS_ExamDetailAnswer(HDS_ExamDetailAnswer hDS_ExamDetailAnswer) { base.AddObject("HDS_ExamDetailAnswer", hDS_ExamDetailAnswer); }
/// <summary> /// Create a new HDS_ExamDetailAnswer object. /// </summary> /// <param name="exda_ID">Initial value of the Exda_ID property.</param> public static HDS_ExamDetailAnswer CreateHDS_ExamDetailAnswer(global::System.Int32 exda_ID) { HDS_ExamDetailAnswer hDS_ExamDetailAnswer = new HDS_ExamDetailAnswer(); hDS_ExamDetailAnswer.Exda_ID = exda_ID; return hDS_ExamDetailAnswer; }