Building a backend management system for ASP. Mvc4+ef5+easyui+unity2.x Injection (47)-Workflow design-Supplemental

Source: Internet
Author: User

Series Catalogue

To add, someone wants the code for the form, which generates the index code for the table Flow_form table with the code generator to

Plus a couple of buttons, you can.

<Divclass= "Mvctool">    <inputID= "Txtquery"type= "text"class= "SearchText" />@Html. Toolbutton ("Btnquery", "Icon-search", "Query", Perm, "query", True) @Html. Toolbutton ("Btncreate", "Icon-add" , "Design form", Perm, "Create", True) @Html. Toolbutton ("Btnedit", "Icon-edit", "1. Modify form", Perm, "edit", True) @Html. toolbut Ton ("Btneditstep", "Icon-edit", "2. Design steps", Perm, "edit", True) @Html. Toolbutton ("Btneditsteprule", "Icon-edit", "3. Design Branch ", Perm," edit ", True) @Html. Toolbutton (" Btneditlayout "," Icon-edit "," 4. Design Layout ", Perm," edit ", True) @Html. Toolbutton ("Btndetails", "icon-details", "View Details", Perm, "details", true) @Html. Toolbutton ("Btndelete", "Icon-remove", "delete", Perm, "Delete", True)</Div>

And then add a more detailed view

@model app.models.flow.flow_formmodel@using App.common; @using App.Models.Flow; @using app.admin; @using    app.models.sys;@{viewbag.title = "Create";    Layout = "~/views/shared/_index_layoutedit.cshtml"; List<Permmodel>Perm = (List<Permmodel>) Viewbag.perm; if (perm = = null) {perm = new List<Permmodel>(); }}<style>. Tbdetail{width:98%;Border-collapse:collapse; }. Tbdetail. AlignRight{width:150px;text-align: Right; }. Tbdetail TD{Border-bottom:1px solid #F4F4F4;Height:30px;Word-wrap:Break-word;Word-break:Break-all; }. Tbcalendar,. Tbcalendar td,. Tbcalendar TH{Border:1px solid #cccccc;Border-collapse:collapse;padding:5px;text-align:Center; }. Tbcalendar th{background:#f4f4f4; }</style>       <Divclass= "TC"style= "padding:10px;">@Model. Name</Div> <Tableclass= "Tbdetail">@{int i = 0;             foreach (var item in model.steplist) {i++; <TR>                <TDAlign= "Center">         <Tableclass= "Tbdetail">                        <TR>                            <TDclass= "AlignRight">Step @i: </TD>                            <TD>@item. Name</TD>                        </TR>                        <TR>                            <TDclass= "AlignRight">Flow rules:</TD>                            <TD>Press @ (item. Flowrule)</TD>                        </TR>@{Int j = 0;                                            foreach (var judge in Item.steprulelist) {j + +; <TR>                                                <TDclass= "AlignRight">Branch @j: </TD>                                                <TD>@String. Format ("If [{0} {1} {2}]→[{3}]", Judge. Attrname, Judge. Operator, Judge. Result, Judge. NextStep = = "0"? "Process End": Judge. Nextstepname)</TD>                                            </TR>                            }                         }                    </Table>                </TD>            </TR>            <TR>                <TDAlign= "Center">↓</TD>            </TR>    }}        <TR>            <TDAlign= "Center">Process End</TD>        </TR>        </Table>
Details
#region Verbose [supportfilter (actionname = "Edit")] public ActionResult details (string id) {            Viewbag.perm = Getpermission (); Flow_formmodel Flowformmodel = M_bll.            GetById (ID);                Get the existing steps gridpager pager = new Gridpager () {rows = $, page = 1,            sort = "Id", order = "ASC"}; flowformmodel.steplist = new List<Flow_stepmodel>();            Flowformmodel.steplist = stepbll.getlist (ref pager, flowformmodel.id); for (int i = 0; I<Flowformmodel. Steplist.count; i++)//Get steps below the steps rule {flowformmodel.steplist[i].steprulelist= newList<flow_steprulemodel>(); Flowformmodel.steplist[i].steprulelist = Getsteprulelistbystepid (Flowformmodel.steplist[i].            ID);        } return View (Flowformmodel); } #endregion
Details Action

So far, it's been a bit of a fan.

Building a backend management system for ASP. Mvc4+ef5+easyui+unity2.x Injection (47)-Workflow design-Supplemental

Related Article

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.