locked
How to Show Approvel and Pending in Gridview ASP.NET RRS feed

  • Question

  • User1997788493 posted

    Hai Good Evening,

    I want to Create a grid view With Approvel and Pending Requests..?? 

    How to Create it..??? And

    How to set a Notification When new Record Inserted in Grid View In Asp.net..??

    Thank you

    Tuesday, August 2, 2016 1:01 PM

Answers

  • User283571144 posted

    Hi DDNaidu,

    DDNaidu

    How to Do This Task...I want an Idea About This..??

    According to your description, I suggest you could do as follow steps:

    1.Create a database table which has colunms about "UserId,UserName,RequestStatus,Roles".

    2.Create a register page and login page.

    3.Create a page for all user could login in, in this pages has a submit button for leave application.

    4.If user submit a leave application request, insert this data into database which values is (UserID,UserName,Pending Status).

    5.Create a admin page which only Manager or HR could login in. In this page has a gridview , and in every row has a button which could modify data in database.

    For example: Click Approve button, in this button click event, you could modify "Pending Status" to "Approve" in database.

    6.Then send a request message to user page to show his leave is approve.

    Besides, if you want to show a notice in admin page after database changed, I suggest  you use SqlDependency + SignalR to do it.

    SignalR: http://signalr.net/

    SqlDependency : http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldependency(v=vs.110).aspx

    Sample link:

    http://stackoverflow.com/questions/28017993/create-real-time-notification-module-like-facebook-for-database-changes

    Best Regards,

    Brando

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 3, 2016 10:11 AM

All replies

  • User753101303 posted

    Hi,

    It all dépends what you want. An approach could keep the date/time of the last notification and the creation date/time of each row. This way you can schedule a job (maybe on the SQL Server side if you have control on the server) to generate a mail that gather all creation since the last notification.

    I would avoid sending a mail immediately each time unless you are 100% it is and will always be what is needed (ie it will be always super urgent). Not directly coupling the creation when sending a mail allows to rather generate a daily summary which might be more convenient than receiving tons of individual emails during the day.

    If it doesn't help please be explicit about the exact point on which you have a problem.

    Tuesday, August 2, 2016 1:09 PM
  • User1997788493 posted

    Thank you for Reply,

    My Requirement Is a Leave Management System..,When did an Employee Rise a Request for Leave..,I want to show it like a notification in Admin Panel Section

    And 

     Employee Rise Is his Request For Leave I want to show it in Pending Status After Manager or HR Will Approve then Show it Like "APPROVED"

    How to Do This Task...I want an Idea About This..??

    thank you

    Tuesday, August 2, 2016 1:16 PM
  • User283571144 posted

    Hi DDNaidu,

    DDNaidu

    How to Do This Task...I want an Idea About This..??

    According to your description, I suggest you could do as follow steps:

    1.Create a database table which has colunms about "UserId,UserName,RequestStatus,Roles".

    2.Create a register page and login page.

    3.Create a page for all user could login in, in this pages has a submit button for leave application.

    4.If user submit a leave application request, insert this data into database which values is (UserID,UserName,Pending Status).

    5.Create a admin page which only Manager or HR could login in. In this page has a gridview , and in every row has a button which could modify data in database.

    For example: Click Approve button, in this button click event, you could modify "Pending Status" to "Approve" in database.

    6.Then send a request message to user page to show his leave is approve.

    Besides, if you want to show a notice in admin page after database changed, I suggest  you use SqlDependency + SignalR to do it.

    SignalR: http://signalr.net/

    SqlDependency : http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldependency(v=vs.110).aspx

    Sample link:

    http://stackoverflow.com/questions/28017993/create-real-time-notification-module-like-facebook-for-database-changes

    Best Regards,

    Brando

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 3, 2016 10:11 AM