• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 370
  • Last Modified:

Online-newspaper idea.

Hi,
I'm building kind of a  online-newspaper project,but now I'm stuck in the Admin part, I will describe it like this :
There are 2 tables in SQL Server that I store all the news ,I call it 1 and 2,
1 store all the news : Pending and also the Published, and 2 store only the Published.

There's 1 acc for the admin and many for the reporters
+ The reporter write a news on the site, a database store it with the status : Pending -> store in the table 1.
+The Admin can write a news also.
+ The Admin comes to the site everyday, check if there's some Pending news, read them, edit, and change the status to Published -> save changes in table 1 and create a new record in table 2.
+The Admin want to edit a news with the status "Published" , he change it in table 2, and when he save , also that news in table 1 also will be save.
+The Admin want to delete a news with the status "Published", he delete it in table 2, and also that news in table 1 will be delete.

I don't know if it's enough for all the case happen.
And now it's hard for me to show all of them in 1 aspx page.
With the page Admin_news.aspx , I have to do tasks :  create new Pending/Published news, edit Pending/Published news, change Pending/Published news status, delete Pending/Published news .
I put a radio button on the page for the Admin can change the status : Pending and Published.
All I need is an idea, how to do it in the right way.
And if you have any experiences in this kind of project, pls advise any idea to make it improve .
Very appriciate with all comments. Nice day
Thanks
0
vinhthuy_nguyen
Asked:
vinhthuy_nguyen
  • 5
  • 3
2 Solutions
 
rugu_16Commented:
Hi Vin,

Intresting project! So as I understand so far you have developed 2 tables in database and admin can access it. Now I have developed something similar fro magazine company few years ago so I think may be you can use some othe features though I dont know how big your project is and what is the time constrain. Because if its small project then its not worth adding to many details.

(1) Admin and writters can have spell check option for fast data editing
(2) If you can design it nicely then I think using frame will be very good design for your project
     but again frames can get ugly and it can mess up the page settings so make sure you know
     you know what you will be doing
(3) Another good feature is admin and other publishers can have seperate web page where they
     can post suggestions and ideas to whole team. (chat applet can be used but that will be to big
     for small project )

Let me know if you want to further discuss this projcet
All the best
thank you
Rugved
0
 
tusharashahCommented:
Some suggetion:

2 tables in SQL Server that I store all the news:
  - If the structure of these 2 tables are same then you really should make 1 table out of these 2 tables ( remember 'Normalization'!)
  - Make 1 table and add a column for Status (Pending/Published), this way it'll be much easier to manage also.

And now it's hard for me to show all of them in 1 aspx page.
  - Make a Navigation menu for Admin and do different task in different page. that way you'll have clear and easy to understand website.

My 2 cents :)

-tushar

ps. Rugu!
0
 
vinhthuy_nguyenAuthor Commented:
Thanks guys,
Rugu, Tusharashah, this is not a very big project at the moment, but I think there'll be quite many readers so it must have great performance. And that I think I should split it to 2 tables, table 2 is use for admin insert news and the readers read, and 1 for the reporters and admin.  
(1) Yes, I think fast data edit is a nice idea. I already have it in my datagrid editing.
(2) I don't like frame much.
(3) Acctually I have a table comments for all the news, but still not use it, :-) , and always very glad to hear more from you.

And the below problem too, I think it easy to solve but acctually I'm almost lost now after 3 unsleep days. :-(
I mean here is the specified page in the project that I use for news editing , I called Admin_news.aspx. In this page I have to do all the tasks above. Let's me make the page things more clear :
I have these in this page :
- A User Control use for a Navigation
- some textboxs for data fields
- a dropdownbox for choosing the zone for this news.
- 2 radio buttons for select the status

And now, all the case I think out here is and also with the query string to do the task :
- Add a new news - save it Pending/Published    ->Admin_news?do=new&zone=abc
- Edit a Pending news - save it Pending             ->Admin_news?do=edit&zone=abc&id=123
- Edit a Pending news - save it Published             ''
- Edit a Published news - save it Pending             ''
- Edit a Published news - save it Published           ''
- Delete a Pending news
- Delete a Published news
I'm ok with the new one.
But i'm stuck in how to know when the user change the status Pending/Published, how to regconize and save it correctly.
Do I need a public variable that store the the status when the first Page_Load for editing news , and I just compare it with the radio button value after editing ?
If so, pls help me to declare it .
And hope you help me with more idea.
Nice day.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
tusharashahCommented:
Do you have a Save button, after they Change Status from Pending --> Published?

Whenever they Hit save the data should be copied in your DataBase server, so that it can be reflected at every places where your website is being accessed. And you'll have current and accurate status in every page of your website without storing it in any temp variable.

(in anycase you if you prefere to store it in temp variable then you can save status in Session["Status"] variable and retrieve it anywhere)

-tushar

0
 
vinhthuy_nguyenAuthor Commented:
Yes, I have Save button, may be I don't make thing clear enough,
Let me go out for coffe and come back to you guys later.
Nice day.
0
 
vinhthuy_nguyenAuthor Commented:
Hi guys, can you give some more ideas ? Acctually I just want to ask you the right way that all the programmer do, I don't have any experience in this project.
0
 
tusharashahCommented:
Hello vinthuy_nguyen,

Can you be more specific?

-tushar
0
 
vinhthuy_nguyenAuthor Commented:
OK, hope the code make things clear .
With the table A and table B as above.
Sub Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click
            If Request.QueryString("do") = "new" Then
                   If status="Pending" Then
                           'Insert new record to table A with status "Pending"

                   Else
                          'Insert new record to table A with status "Published"
                          'Insert new record to table B
                   End If
           Else
                   If status="Pending" Then
                          'check the origin status
                          If the origin status is Pending
                                     'Update record in table A
                          Else (the origin status is Published)
                                     'Delete the record in table B
                                     'Update the record in table A
                   Else
                         'check the origin status
                          If the origin status is Pending
                                     'Update record in table A
                                     'Insert record in table B
                          Else (the origin status is Published)
                                     'Update the record in table A
                                     'Update the record in table B


           End If

        End Sub
I need here is a way to check and store the origin status.Did it clear ? Pls ask if it not clear, I'm bad at explanation.

Another thing, can you advise me some more specific features for my project ? Do they call it a CMS ?
Thanks for all the advices.
0
 
vinhthuy_nguyenAuthor Commented:
Thanks for advices, buddies.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now