/// <summary> /// constructor of the LoginModel layer, gets the DB access infos /// </summary> /// <param name="dbci"></param> public ServiceLoginModel(Form parent, UserConnDetails dbci) { this.parent = parent; this.dbci = dbci; startDBconnect = new InterfaceMySQLStartDBConnect(); mdi = startDBconnect.kapcsolodas(dbci, parent); }
/// <summary> /// coordinates the connection end communicarions with the DB under MetroWinForm environment /// with the needed connection datas - all must have at least "" content /// </summary> /// <param name="host">host adress</param> /// <param name="port">port number</param> /// <param name="database">managed DB name</param> /// <param name="user">uername to enter with</param> /// <param name="pwd">password to enter with</param> /// <param name="consoleErr">is needed console based errors?</param> /// <param name="oldFormErr">is needed old WinForm errors?</param> /// <param name="metroFormErr">is needed Metro WinFrom errors?</param> /// <param name="parentForm">the parent MetroWindow</param> /// <returns>MySqlInterface with basic adjusts</returns> public InterfaceMySQLDBChannel kapcsolodas(UserConnDetails dbci, System.Windows.Forms.Form parent) { InterfaceMySQLDBChannel mdi = new InterfaceMySQLDBChannel(); mdi.setErrorToUserInterface(true); //ha hiba van, megjeleni - konzolos mdi.setErrorToGraphicalUserInterface(true); //ha hiba van, megjeleni - régebbi Form verzióban mdi.setErrorToMetroGraphicalUserInterface(true, parent); //ha hiba van, megjeleníti - újabb MetroForm-ban mdi.setConnectionServerData(dbci.host, dbci.db, dbci.port); //hely, adatbázis neve, portja mdi.setConnectionUserData(dbci.user, dbci.pwd); //admin név, jelszava mdi.makeConnectionToDatabase(); //beállítja az alap kapcsolódási adatokat return(mdi); }
/// <summary> /// process of collect user personal details and rights of its group /// </summary> public void collectDatasOfVerifiedUser() { try { param = new KeyValuePair <string, string>("@userID", userId); } catch (Exception e) { throw new ErrorServiceLoginDBAccess("Lekérdezés összeállítási hiba (ModLoginUserDetSeek) " + e.Message); } mdi = startDBconnect.kapcsolodas(dbci, parent); mdi.openConnection(); rightFromDB = mdi.execPrepScalarQueryInStringWithKVP(queryOfRights, param); userDatas = mdi.execPrepQueryOneRowInStringArrWithKVP(queryOfUserPersonalDet, param); mdi.closeConnection(); }
public RequestsModelWirteOut(UserConnDetails dbci, Form parent) { startDB = new InterfaceMySQLStartDBConnect(); mdi = startDB.kapcsolodas(dbci, parent); }
public ProductsModelReadIn(UserConnDetails dbci, Form parent) { startDB = new InterfaceMySQLStartDBConnect(); mdi = startDB.kapcsolodas(dbci, parent); }
public OrderingModellerWriteOut(UserConnDetails dbci, Form parentMain) { startDB = new InterfaceMySQLStartDBConnect(); mdi = startDB.kapcsolodas(dbci, parentMain); }
public OrderingModellerReadIn(UserConnDetails dbci, Form parentMainWin) { startDB = new InterfaceMySQLStartDBConnect(); mdi = startDB.kapcsolodas(dbci, parentMainWin); getTheUserPoolForTableFilling(); }
public PersonalProfileModelDB(UserConnDetails dbci, Form parent) { startDB = new InterfaceMySQLStartDBConnect(); mdi = startDB.kapcsolodas(dbci, parent); }
public ServiceRightsModel(UserConnDetails dbci, Form paretnRightWin) { startDB = new InterfaceMySQLStartDBConnect(); mdi = startDB.kapcsolodas(dbci, paretnRightWin); }