Joe
|
| Posted: 12/13/2004, 1:38 PM |
|
I need a little help not only on the backend part of this project, but the logistics of the project. First of all; my project is an order entry system. Several different companies log into the website to check status of their orders. I have this part working perfect. The login, the reports, Etc…. but now I came up with an idea that instead of these companies logging in everyday to check status of their orders. If they could click a button to get an email every time the status changed. That would be the greatest thing. What I thought could happened was; When they say they want an email. That order number would save to a table. With there email address which is already located in a users information table. And then every time a page is hit or I hit a page this code would check the table and find that order and if the status has changed from when they submitted the order number they would receive an email with all the information on it. But if no change to the order number it would skip over that user and not send an email. But here is were it get a little complicated, when the order is finally done and it says closed; It will send out the email and then take the user off the list and delete him/her from the table. Any help would be great. Either some direction, code, examples, Etc… anything.
I am currently using MS SQL, ASP, CCS
Thanks for all the help in advanced.
joe
|
|
|
 |
Benjamin Krajmalnik
|
| Posted: 12/13/2004, 2:10 PM |
|
Joe,
I would approach it slightly differently.
I would have a user level setting on whether to send notifications.
I would set up an update trigger on the order so that when the status is
changed a flag is set.
I wouold write a service which runs in the background and processes all
records with the flag set by e-mailing the required infomration and clearing
the flag.
Regards,
Benjamin
"Joe" <Joe@forum.codecharge> wrote in message
news:641be0be09f3f0@news.codecharge.com...
> I need a little help not only on the backend part of this project, but the
> logistics of the project. First of all; my project is an order entry
system.
> Several different companies log into the website to check status of their
> orders. I have this part working perfect. The login, the reports, Etc..
but now
> I came up with an idea that instead of these companies logging in everyday
to
> check status of their orders. If they could click a button to get an email
> every time the status changed. That would be the greatest thing. What I
thought
> could happened was; When they say they want an email. That order number
would
> save to a table. With there email address which is already located in a
users
> information table. And then every time a page is hit or I hit a page this
code
> would check the table and find that order and if the status has changed
from
> when they submitted the order number they would receive an email with all
the
> information on it. But if no change to the order number it would skip over
that
> user and not send an email. But here is were it get a little complicated,
when
> the order is finally done and it says closed; It will send out the email
and
> then take the user off the list and delete him/her from the table. Any
help
> would be great. Either some direction, code, examples, Etc. anything.
>
> I am currently using MS SQL, ASP, CCS
>
> Thanks for all the help in advanced.
>
> joe
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
Joe
|
| Posted: 12/14/2004, 7:45 AM |
|
Still a little lost.......... little more detail would be great Benjamin Krajmalnik. Thanks for the info so far, but a little more would be great. I kind of get what you are saying but not really. Thanks
|
|
|
 |
Benjamin Krajmalnik
|
| Posted: 12/14/2004, 5:36 PM |
|
If I understood you correctly, you are "sweeping" the database when a user
logs in, or accesses a page, or whatever.
The way I would design the system is for the order file to have a flag set
to 1 whenever the order status is updated.
Then, you have a separate application running on your network (ideally a
service) which every x minutes goes through all of the orders which have the
given bit set to 1, checks the related user record to see if notifications
need to be sent, and if so sends the notifications.
Everytime your service runs its processing cycle, it would clear the bit
flag.
|
|
|
 |
|