MVC and Bootstrap-based permissions framework solution two. Add additions and deletions to change the search button

Source: Internet
Author: User

In the previous issue we have set up the framework and added the display of the list,

In this issue, we will add additions and deletions to the search button

The overall effect is as follows

HTML section, find the favorite button in HTML by viewing the element, copy the HTML code into the project

<aclass= "Btn btn-small element"Data-original-title= "new"href= "/customer/add"Data-toggle= "tooltip"data-placement= "Top">      <Iclass= "Icon-edit"></I></a>
Public ActionResult Add (customerinfo cus)        {            if (Request.httpmethod = = "POST"            )                {basebll<customerinfo> BLL = New BASEBLL<customerinfo>();                if (BLL. Add (Cus, "") > 0)                {                    //File upload to server                    return CONTENTJ ("Add Success", "customerlist");                }            }            return View ();        }

New Complete

<Divclass= "Btn-group">     <ahref= "/customer/[email protected]_id"Data-original-title= "Modify"class= "Btn btn-small element"><Iclass= "Icon-edit"></I> </a>     <ahref= "/customer/[email protected]_id"Data-original-title= "Delete"class= "Btn btn-small element"><Iclass= "Icon-trash"></I> </a>     <ahref= "/jiekuan/[email protected]_id"Data-original-title= "Borrowing entry"class= "Btn btn-small element"><Iclass= "Icon-pencil"></I> </a>     <ahref= "/jiekuan/[email protected]_id"Data-original-title= "Borrowing View"class= "Btn btn-small element"><Iclass= "Icon-eye-open"></I> </a> </Div>
 PublicActionResult Edit (stringCID) {BASEBLL<CustomerInfo> BLL =NewBasebll<customerinfo>(); CustomerInfo Info=BLL.            Getmodel (CID); returnView (info); } [HttpPost] Publicactionresult Edit (customerinfo cus) {BASEBLL<CustomerInfo> BLL =NewBasebll<customerinfo>(); Bll. Update (cus,""); returnCONTENTJ ("Modification succeeded","customerlist"); }         PublicActionResult Delete (stringCID) {BASEBLL<CustomerInfo> BLL =NewBasebll<customerinfo>(); if(BLL. Delete (CID) >0)            {                returnCONTENTJ ("Delete succeeded","/customer/customerlist"); }            returnView ("/customer/customerlist"); }

Additions and deletions to complete,

All the code for the Add and revise check is complete.

Next: Add File upload and picture display for K2 frame

If you are interested in this framework Dabigatran discussion 257749427

MVC and Bootstrap-based permissions framework solution two. Add additions and deletions to change the search button

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.