public Member GetMICMember(int numberMember) { help = new DBHelper(); return checkDataInMember(help.GetMember(numberMember)); }
public Member GetMICGodFather(Member member) { help = new DBHelper(); return help.GetMember(member.God_Father); }
public string[] GetMICLocals() { help = new DBHelper(); return help.GetLocals().ToArray<string>(); }
public void PutInSameEnterDateMembers(DateTime date) { help = new DBHelper(); Program.MainWindow.PutInMembersListBoxSameEnterDateMembers(help.GetSameEnterDayShorts(date)); }
public void PutInSameCityMembers(string city) { help = new DBHelper(); Program.MainWindow.PutInMemberListBoxSameCityMembers(help.GetSameCityPeople(city)); }
public void PutInGodFather(Member member) { help = new DBHelper(); Program.MainWindow.PutInMemberCardGodFather(GetMICGodFather(member)); }
private static void openConnection() { db = new DBHelper(); connection = db.CreateConnection(); connection.Open(); }
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; }