i have a program that allow user to add data into database,but i want it look proper to admin to view the new item. Right now when user submit new data the admin can view all the data have been submitted from database but now i want the admin can alert the new data have been submitted by user. By the way i using asp.net,back end Vb.net and db is MYSQL.
There are huge variety of ways how you could implement desired feature. General algorithm is next
Commit each user data sumbission event into storage
Gather all events by timer
Render gathered facts in admin UI
To achieve this consider to use for step 1 MySQL triggers. Create additional table and save user data submission events into it.
Use scheduled asynchronous event monitoring for step 2,
Related
Dears, I am able to create a rest api that saves, deletes and updates products or asserts and within the asserts entity class I have a created_by field mapped to a database table which I can only update by typing my name every time to show that I am the one who have created it, but however this is not what I want, I have got a rest api that simply asks for my username and password and validate against the users table in the database.
So I want the this userid to continue to linger into the application session as long as the rest api app is running and then when I create new asserts(products) the methods defined for saving those products should automatically save that currently running user_id in memory.
I have no idea how I can accomplish this. Please any ideas.
I have created my entity classes for Asserts, Users and I can perform all CRUD actions on them successfully but the problem is on saving the user automatically without manually saving the user_id everytime an assert(product) is added, deleted, or updated.
I am using angular 9 and have forms with multiple parts.. like first section about name and personal details, second part about their primary school, third part about users past jobs, etc..
And each part has heading in a side menu.
personal details
primary school
previous job
Clicking on which user can go to that particular part of form..
The question is if the user, completes 2 parts i.e. personal details and primary school and then exits the browser.. the next time when the users logs in.. the first thing I want to display is the 3rd form i.e. previous job to the user.. so that he can continue from there..
Conversely I also want to send an mail to the user stating 'please fill the previous job details in xyz.com'
How to store this kind of data.. can it be done by angular services or need to use NgRx store as must.. if ngrx is needed.. can I somehow store the state in some form in api..
I m using Express with mysql in backend..
Ngrx store is mainly used to have consistant data in more than one component(like user name which should be same in header and profile component). for your scenario ngrx store is not needed, and one more thing, even if you want to use ngrx store when user closes data, you still have to store data in local storage or backend. so that you can use that data when user opens that page.
For your scenario use backend to store data. whenever he comes back to that page, first fetch data and fill it into fields.
Hope it helps. thank you
We have a website that users login to, and can then book on to courses. These courses and the bookings are stored in our SQL database against the user's UserID. On the course page the user is able to add the course to their Outlook calendar via a simple ICS file that is generated when the user clicks on the button to add it by submitted the required data into the ICS file within the URL that calls it and then using <%=Request("CourseName")%> in the ICS file itself.
We are now looking to create a new ICS file that a user can subscribe to that will update their Outlook calendar with all of the courses they have signed up for, and will automatically update if/when a course has a change applied to it or if the user signs up to a new course then this will also automatically be added to their calendar. I can work out how to generate an ICS file that will hold all of this data using a similar setup to what I have done for the individual courses above, but I cannot work out how to create an ICS file that automatically updates with new information.
I don't know if I need to;
1. Have a hardcoded ICS file stored on the server for each individual user that is then updated as and when a change is made (I would prefer to avoid this as we have a lot of users)
2. If there is a way I can include a SQL statement within an ICS file that will then get the latest course data for the user on the fly (this is preferred, but testing this option so far has always resulted in errors)
3. Something else I have not thought of yet
Any help would be appreciated on this!
Here is the approach we are using to solve a similar problem:
Every time an admin changes an event or a user changes their subscription, we trigger an API call to do two things: (1) notify the relevant users of the changes using an auto-generated iCalendar event (.ics), and (2) update the database with the changes.
We opted to give the users and the administrators the power to trigger event-changes, rather than have a timer that checks and sends out updates, because we wanted to avoid the lag.
As to your question about auto-generating, this requires you to create an event_id, which you re-use in the .ics file, along with a METHOD:REQUEST, which notifies the user's email that you are sending a: (a) new event, or (b) change to a prior event. If you build a dynamic iCalendar script, this is possible. You must capture the "changes" and flow them through to a new .ics request.
Scenario
I am making a small Web application based on Yii2.
There are 2 entities 'User' and 'Admin' in my system.
Required solution for:
I want to know if there is any facility in Yii2 where I can trigger Scheduled Events like creating User Registration expiry, promotional emails and stuff ?
Currently I am triggering event when Admin logs in, but I want this Scheduled irrespective of whether Admin logs in or not.
Just create an action in console controller which will handle events and execute it regularly using CRON.
I have 2 websites, and both have a login system, where the user can create an account to access a special portion of our website. Website A is a standard LAMP creation, and the user information is thus stored in a MySQL database. Website B is a site that is hosted on SharePoint and the user information is stored in a SharePoint Form Based Authentication (FBA) database.
I want to make it so that when a user creates an account on Website A, an account is automatically created on Website B.
Does anybody know of an easy way to do this? I'm thinking when the account is created on Website A, the website can send a query to both databases and create the same information. OR the 2 databases could be kept in sync somehow.
Any help would be greatly appreciated! Thanks much.
Regarding your first method: I think it's not good solution because you have to wait until server b won't response. Better way is to use event model based on queue.
You have queue of ids which are new created users and add user_id from the first server to this queue during user's creation. From other side you have cron script with infinite loop
while(1) {
sleep(10);
//check new user_id in queue
if (no) {
continue;
}
//create a new user in server B and remove user_id from queue
}