public static bool AddNew(HDS_StandardRating Rat) { try { ExamSystemManagerDBEntities exMana = new ExamSystemManagerDBEntities(); exMana.AddToHDS_StandardRating(Rat); exMana.SaveChanges(); } catch (Exception e) { errMsg = e.Message; return false; } errMsg = ""; return true; }
public static bool Update(HDS_StandardRating Rat) { try { ExamSystemManagerDBEntities exMana = new ExamSystemManagerDBEntities(); HDS_StandardRating obj = exMana.HDS_StandardRating.First(temp => temp.Iex_ID == Rat.Iex_ID); obj.Iex_ID = Rat.Iex_ID; obj.Rat_FromMark = Rat.Rat_FromMark; obj.Rat_ToMark = Rat.Rat_ToMark; obj.Rat_Name = Rat.Rat_Name; obj.Rat_Description = Rat.Rat_Description; exMana.SaveChanges(); } catch (Exception e) { errMsg = e.Message; return false; } errMsg = ""; return true; }
/// <summary> /// Deprecated Method for adding a new object to the HDS_StandardRating EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToHDS_StandardRating(HDS_StandardRating hDS_StandardRating) { base.AddObject("HDS_StandardRating", hDS_StandardRating); }
/// <summary> /// Create a new HDS_StandardRating object. /// </summary> /// <param name="rat_ID">Initial value of the Rat_ID property.</param> public static HDS_StandardRating CreateHDS_StandardRating(global::System.Int32 rat_ID) { HDS_StandardRating hDS_StandardRating = new HDS_StandardRating(); hDS_StandardRating.Rat_ID = rat_ID; return hDS_StandardRating; }