예제 #1
0
 public Member GetMICMember(int numberMember)
 {
     help = new DBHelper();
     return checkDataInMember(help.GetMember(numberMember));
 }
예제 #2
0
 public Member GetMICGodFather(Member member)
 {
     help = new DBHelper();
     return help.GetMember(member.God_Father);
 }
예제 #3
0
 public string[] GetMICLocals()
 {
     help = new DBHelper();
     return help.GetLocals().ToArray<string>();
 }
예제 #4
0
 public void PutInSameEnterDateMembers(DateTime date)
 {
     help = new DBHelper();
     Program.MainWindow.PutInMembersListBoxSameEnterDateMembers(help.GetSameEnterDayShorts(date));
 }
예제 #5
0
 public void PutInSameCityMembers(string city)
 {
     help = new DBHelper();
     Program.MainWindow.PutInMemberListBoxSameCityMembers(help.GetSameCityPeople(city));
 }
예제 #6
0
 public void PutInGodFather(Member member)
 {
     help = new DBHelper();
     Program.MainWindow.PutInMemberCardGodFather(GetMICGodFather(member));
 }
예제 #7
0
 private static void openConnection()
 {
     db = new DBHelper();
     connection = db.CreateConnection();
     connection.Open();
 }
예제 #8
0
 private static string getUserValueByIdAndAttr(int idUser, string attrName)
 {
     db = new DBHelper();
     int attrId = db.GetAttrIdByName(attrName);
     openConnection();
     string condition = "id_user = '******' and id_attr = '" + attrId.ToString() + "'";
     MySqlCommand command = new MySqlCommand(db.SelectSQLQuery("value", Const.USER_VALUES_TABLE, condition), connection);
     MySqlDataReader reader = command.ExecuteReader();
     if (reader.Read() == false) {
         return "";
     }
     string userValue = reader.GetString(0);
     connection.Close();
     return userValue;
 }