public static bool AddNew(HDS_InitExamDetail Iexd)
 {
     try
     {
         ExamSystemManagerDBEntities exMana = new ExamSystemManagerDBEntities();
         exMana.AddToHDS_InitExamDetail(Iexd);
         exMana.SaveChanges();
     }
     catch (Exception e)
     {
         errMsg = e.Message;
         return false;
     }
     errMsg = "";
     return true;
 }
 public static bool Update(HDS_InitExamDetail Iexd)
 {
     try
     {
         ExamSystemManagerDBEntities exMana = new ExamSystemManagerDBEntities();
         HDS_InitExamDetail obj = exMana.HDS_InitExamDetail.First(temp => temp.Iex_ID == Iexd.Iex_ID);
         obj.Iex_ID = Iexd.Iex_ID;
         obj.Lev_ID = Iexd.Lev_ID;
         obj.Iexd_NumQuestion = Iexd.Iexd_NumQuestion;
         exMana.SaveChanges();
     }
     catch (Exception e)
     {
         errMsg = e.Message;
         return false;
     }
     errMsg = "";
     return true;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the HDS_InitExamDetail EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToHDS_InitExamDetail(HDS_InitExamDetail hDS_InitExamDetail)
 {
     base.AddObject("HDS_InitExamDetail", hDS_InitExamDetail);
 }
 /// <summary>
 /// Create a new HDS_InitExamDetail object.
 /// </summary>
 /// <param name="iexd_ID">Initial value of the Iexd_ID property.</param>
 public static HDS_InitExamDetail CreateHDS_InitExamDetail(global::System.Int32 iexd_ID)
 {
     HDS_InitExamDetail hDS_InitExamDetail = new HDS_InitExamDetail();
     hDS_InitExamDetail.Iexd_ID = iexd_ID;
     return hDS_InitExamDetail;
 }