public static bool deleteFamilyOfStudent(int stuId)
 {
     try
     {
         DbEntry.UsingTransaction(delegate
         {
             FamilyOfStudent stu = FamilyOfStudent.FindById(stuId);
             stu.IsDelete        = true;
             stu.Save();
         });
     }
     catch { return(false); }
     return(true);
 }
 public static bool UpdateFamilyOfStudent(int family_id, string name, bool sex, DateTime birthday, String relationship, String company, String tip)
 {
     try
     {
         DbEntry.UsingTransaction(delegate
         {
             FamilyOfStudent stu = FamilyOfStudent.FindById(family_id);
             stu.Name            = name;
             stu.Sex             = sex;
             stu.Birthday        = birthday;
             stu.Relationship    = relationship;
             stu.Company         = company;
             stu.Tip             = tip;
             stu.Save();
         });
     }
     catch { return(false); }
     return(true);
 }
 public static bool AddFamilyOfStudent(int student_id, string name, bool sex, DateTime birthday, String relationship, String company, String tip)
 {
     try
     {
         DbEntry.UsingTransaction(delegate
         {
             FamilyOfStudent stu = new FamilyOfStudent();
             stu.Student_Id      = student_id;
             stu.Name            = name;
             stu.Sex             = sex;
             stu.Birthday        = birthday;
             stu.Relationship    = relationship;
             stu.Company         = company;
             stu.Tip             = tip;
             stu.IsDelete        = false;
             stu.Save();
         });
     }
     catch { return(false); }
     return(true);
 }