Exemple #1
0
        public async Task <IActionResult> Form(int id = 0, int typeid = 10002)
        {
            ColumnEntity model = await columnService.GetModelByIdAsync(id) ?? new ColumnEntity();

            if (id <= 0)
            {
                model.C_TYPEID = typeid;
            }
            if (typeid == 10003)
            {
                return(View("SingleForm", model));
            }
            else if (typeid == 10004)
            {
                return(View("OutLinkForm", model));
            }
            return(View(model));
        }
Exemple #2
0
        public async Task <IActionResult> Index(int cid = 0, int steps = -1)
        {
            StringBuilder html  = new StringBuilder();
            ColumnEntity  model = await columnService.GetModelByIdAsync(cid) ?? new ColumnEntity();

            html.AppendFormat("<a class=\"btn btn-xs{0}\" href=\"/Article/Index?cid={1}\">全部</a>", steps == -1 ? " btn-primary" : "", model.C_ID);
            switch (model.C_WORKFLOWID)
            {
            case 1:
                html.AppendFormat("<a class=\"btn btn-xs{0}\" href=\"/Article/Index?cid={1}&steps=1\">一审</a>", steps == 1 ? " btn-primary" : "", model.C_ID);
                break;

            case 2:
                html.AppendFormat("<a class=\"btn btn-xs{0}\" href=\"/Article/Index?cid={1}&steps=1\">一审</a>", steps == 1 ? " btn-primary" : "", model.C_ID);
                html.AppendFormat("<a class=\"btn btn-xs{0}\" href=\"/Article/Index?cid={1}&steps=2\">二审</a>", steps == 2 ? " btn-primary" : "", model.C_ID);
                break;

            case 3:
                html.AppendFormat("<a class=\"btn btn-xs{0}\" href=\"/Article/Index?cid={1}&steps=1\">一审</a>", steps == 1 ? " btn-primary" : "", model.C_ID);
                html.AppendFormat("<a class=\"btn btn-xs{0}\" href=\"/Article/Index?cid={1}&steps=2\">二审</a>", steps == 2 ? " btn-primary" : "", model.C_ID);
                html.AppendFormat("<a class=\"btn btn-xs{0}\" href=\"/Article/Index?cid={1}&steps=3\">三审</a>", steps == 3 ? " btn-primary" : "", model.C_ID);
                break;

            case 4:
                html.AppendFormat("<a class=\"btn btn-xs{0}\" href=\"/Article/Index?cid={1}&steps=1\">一审</a>", steps == 1 ? " btn-primary" : "", model.C_ID);
                html.AppendFormat("<a class=\"btn btn-xs{0}\" href=\"/Article/Index?cid={1}&steps=2\">二审</a>", steps == 2 ? " btn-primary" : "", model.C_ID);
                html.AppendFormat("<a class=\"btn btn-xs{0}\" href=\"/Article/Index?cid={1}&steps=3\">三审</a>", steps == 3 ? " btn-primary" : "", model.C_ID);
                html.AppendFormat("<a class=\"btn btn-xs{0}\" href=\"/Article/Index?cid={1}&steps=4\">四审</a>", steps == 4 ? " btn-primary" : "", model.C_ID);
                break;
            }
            html.AppendFormat("<a class=\"btn btn-xs{0}\" href=\"/Article/Index?cid={1}&steps=99\">终审通过</a>", steps == 99 ? " btn-primary" : "", model.C_ID);
            if (model.C_WORKFLOWID > 0)
            {
                html.AppendFormat("<a class=\"btn btn-xs{0}\" href=\"/Article/Index?cid={1}&steps=0\">退稿</a>", steps == 0 ? " btn-primary" : "", model.C_ID);
            }

            ViewBag.NavHtml = html.ToString();
            ViewBag.Steps   = steps;
            return(View(model));
        }