public static bool AddNew(HDS_InitExam Ini)
 {
     try
     {
         ExamSystemManagerDBEntities exMana = new ExamSystemManagerDBEntities();
         exMana.AddToHDS_InitExam(Ini);
         exMana.SaveChanges();
     }
     catch (Exception e)
     {
         errMsg = e.Message;
         return false;
     }
     errMsg = "";
     return true;
 }
 public static bool Update(HDS_InitExam Ini)
 {
     try
     {
         ExamSystemManagerDBEntities exMana = new ExamSystemManagerDBEntities();
         HDS_InitExam obj = exMana.HDS_InitExam.First(temp => temp.Iex_ID == Ini.Iex_ID);
         obj.Iex_Name = Ini.Iex_Name;
         obj.Iex_Description = Ini.Iex_Description;
         obj.Iex_Date = Ini.Iex_Date;
         obj.Lev_ID = Ini.Lev_ID;
         obj.Cat_ID = Ini.Cat_ID;
         obj.Typ_ID = Ini.Typ_ID;
         obj.Iex_NumQuestion = Ini.Iex_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_InitExam EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToHDS_InitExam(HDS_InitExam hDS_InitExam)
 {
     base.AddObject("HDS_InitExam", hDS_InitExam);
 }
 /// <summary>
 /// Create a new HDS_InitExam object.
 /// </summary>
 /// <param name="iex_ID">Initial value of the Iex_ID property.</param>
 public static HDS_InitExam CreateHDS_InitExam(global::System.Int32 iex_ID)
 {
     HDS_InitExam hDS_InitExam = new HDS_InitExam();
     hDS_InitExam.Iex_ID = iex_ID;
     return hDS_InitExam;
 }