Ejemplo n.º 1
0
        public void AssignCompany(string companyGUID)
        {
            RemoveAssignCompany(companyGUID);
            string sql = @"INSERT INTO CompanyUser VALUES( @CompanyUserGUID, @CompanyGUID, @UserGUID)";

            List <System.Data.SQLite.SQLiteParameter> paramList = new List <System.Data.SQLite.SQLiteParameter>();

            paramList.Add(new SQLiteParameter("@CompanyGUID", companyGUID));
            paramList.Add(new SQLiteParameter("@UserGUID", UserGUID));
            paramList.Add(new SQLiteParameter("@CompanyUserGUID", GlobalVariables.GetNewGUID()));

            NGSConnector connector = new NGSConnector();

            connector.execSQL(sql, paramList);
            connector = null;
        }
Ejemplo n.º 2
0
        public void SaveLog(string userGUID, string companyGUID, string logMessage, string logType)
        {
            string sql = @"INSERT INTO LogTable( LogGUID, LogDateTime, LogType, LogMessage, UserGUID, CompanyGUID ) 
                           Values( @LogGUID, @LogDateTime, @LogType, @LogMessage, @UserGUID, @CompanyGUID )";

            List <System.Data.SQLite.SQLiteParameter> paramList = new List <System.Data.SQLite.SQLiteParameter>();

            paramList.Add(new SQLiteParameter("@LogGUID", GlobalVariables.GetNewGUID()));
            paramList.Add(new SQLiteParameter("@LogDateTime", DateTime.Now));
            paramList.Add(new SQLiteParameter("@LogType", logType));
            paramList.Add(new SQLiteParameter("@LogMessage", logMessage));
            paramList.Add(new SQLiteParameter("@UserGUID", userGUID));
            paramList.Add(new SQLiteParameter("@CompanyGUID", companyGUID));

            NGSConnector connector = new NGSConnector();

            connector.execSQL(sql, paramList);
        }