Niyazi Toros

Niyazi Toros

  • NA
  • 41
  • 6.8k

How can I use Partial View with CRUD options?

May 26 2016 2:04 AM

Hi,

I have a customer table and approval table as shown below;


In Customer.cshtml

When User enters the values for Customer Table they will not see the “CustomerActive” column. “CustomerActive” column always False in user part.

Customer.cshtml just list all the Customer but user cannot edit the “CustomerActive” column.

In ApprovalProcess.cshtml

In Approval table I need to show Customer information in above the page when “CustomerActive” column is false. If any rows that has a “CustomerActive = true;” cannot be shown in the list.

In ApprovalProcess.cshtml page I need to use Customer data in a Partial View on top with a select option and not full CRUD options like shown below.

@Html.ActionLink("Select","Approval",new{id=item.CustomerID})

Customer waiting Approval


CUSTID

CustomerName

CustomerSurname

CustomerPhone

CustomerActive


1

John

White

123456

0

Select

2

Marry

Brown

987654

0

Select

3

David

Paker

852197

0

Select

Create New







APPID

CUSTID

ApprovalName

ApprovalDate

Approval




1

John White




Edit

Details

Delete

























And then bottom of the page I need to show my Approval Table data when “Approval” column is false.

When the Manger calls the “ApprovalProcess.cshtml” page and get the data when “CustomerActive” column is false. Then Manager clicks the “Select” button next to Customer row and bottom of the page the Approval Table will show.

The Approval table has an “Approval“ column. When Approval Table will show on bottom of the page “Approval“ column must be false. If any row that has “Approval“ column set to true will not show.

1) In ApprovalProcess.cshtml page I need to use Customer data in a Partial View. How do I do that?

2) In ApprovalProcess.cshtml page after the save process how to set Customer Table “CustomerActive” column to true.

3) In ApprovalProcess.cshtml page has no value then Manager clicks the “Create New” button to enter the data for each specific customer. Selected Customer name must be shown in Approval table. How do I do that?

Kind Regards,



Answers (2)