For some reason, because of the need, the latest to do a customer management system, but not satisfied with only the frame.
Daniel read a lot of the framework to write and powerful is powerful, the code is too TM much mess
did not talk much and get started
Just find a nice HTML online, looks good on him now
1, a new MVC project, which will be placed in the HTML code, with minor modifications, will be able to demonstrate basic out
2, let him become a dynamic, underlying my own underlying framework I use, you can use according to their preferences on OK, it is a simple three-handed
3, is allowed to become dynamic, new \ Controllers \ CustomerController.cs controller, add code
CustomerController class public: the Controller { // the GET: the Customer public ActionResult the CustomerList () { BaseBLL <the CustomerInfo> BLL new new BaseBLL = <the CustomerInfo> (); List <the CustomerInfo> culist bll.GetList = (); // Get a list of the customer database ViewData [ "List"] = culist ; VIEWDATA // copied to the front of the return View (); } }
4, increase the view \ Views \ Customer \ CustomerList.cshtml added foreground code shows data
<div class="row-fluid"> <div class="span12"> <!-- BEGIN EXAMPLE TABLE widget--> <div class="widget"> <div class="widget-title"> <h4><i class="icon-reorder"></i>客户列表</h4> <span class="tools"> <a href="javascript:;" class="icon-chevron-down"></a> <a href="javascript:;" class="icon-remove"></a> </span> </div> <div class="widget-body"> <table class="table table-striped table-bordered" id="sample_1"> <thead> <tr> <th style="width:8px;"><input type="checkbox" class="group-checkable" data-set="#sample_1 .checkboxes" /></th> <th>姓名</th> <th class="hidden-phone">邮箱</th> <th class="hidden-phone">欠款</th> <th class="hidden-phone">日期</th> <th class="hidden-phone"></th> </tr> </thead> <tbody> @foreach (CustomerInfo cu in customerList) { <tr class="odd gradeX"> <td><input type="checkbox" class="checkboxes" value="1" /></td> <td>@cu.Customer_Name</td> <td class="hidden-phone">@cu.Tel</td> <td class="hidden-phone">@cu.Fax</td> <td class="center hidden-phone">2017/03/01</td> <td class="hidden-phone"><a href="#" class="btn mini purple"><i class="icon-edit"></i> Edit</a></td> </tr> } </tbody> </table> </div> </div> <!-- END EXAMPLE TABLE widget--> </div> </div>
5, simple dynamic list of customers so done! !
By just finished, the code has not been packaged, the source code will be given in the next speaking, very easy
Next time: the Add button to K2 framework
As the discussion of the frame of interest may be added to the group 257 749 427