public static bool AddNew(HDS_Exam Exa) { try { ExamSystemManagerDBEntities exMana = new ExamSystemManagerDBEntities(); exMana.AddToHDS_Exam(Exa); exMana.SaveChanges(); } catch (Exception e) { errMsg = e.Message; return false; } errMsg = ""; return true; }
public static bool Update(HDS_Exam Exa) { try { ExamSystemManagerDBEntities exMana = new ExamSystemManagerDBEntities(); HDS_Exam obj = exMana.HDS_Exam.First(temp => temp.Exa_ID == Exa.Exa_ID); obj.Emp_ID = Exa.Emp_ID; obj.Exa_FromDate = Exa.Exa_FromDate; obj.Exa_ToDate = Exa.Exa_ToDate; obj.Res_rating = Exa.Res_rating; obj.Res_Result = Exa.Res_Result; exMana.SaveChanges(); } catch (Exception e) { errMsg = e.Message; return false; } errMsg = ""; return true; }
/// <summary> /// Create a new HDS_Exam object. /// </summary> /// <param name="exa_ID">Initial value of the Exa_ID property.</param> public static HDS_Exam CreateHDS_Exam(global::System.Int32 exa_ID) { HDS_Exam hDS_Exam = new HDS_Exam(); hDS_Exam.Exa_ID = exa_ID; return hDS_Exam; }
/// <summary> /// Deprecated Method for adding a new object to the HDS_Exam EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToHDS_Exam(HDS_Exam hDS_Exam) { base.AddObject("HDS_Exam", hDS_Exam); }