Пояснительная записка. Трач РВ (1228539), страница 7
Текст из файла (страница 7)
mark {
background-color: #f8f8f8;
padding-left: 5px;
padding-right: 5px;
}
#body {
font-family: "Segoe UI", WorkGroup, Verdana;
background-color: #efeeef;
clear: both;
padding-bottom: 30px;
}
.main-content {
padding-left: 10px;
padding-top: 30px;
max-width:960px;
min-height:300px;
}
.featured + .main-content {
background: url("../Images/heroAccent.png") no-repeat;
}
header .content-wrapper {
padding-top: 20px;
}
footer {
clear: both;
background-color: #e2e2e2;
font-size: .8em;
height: 50px;
}
.site-title {
color: #000;
font-family: "Segoe UI", Verdana;
font-size: 1.3em;
margin: 0;
}
.site-title a, .site-title, .site-title a:active {
background: none;
color: #606060;
outline: none;
text-decoration: none;
}
#login {
display: block;
font-size: .85em;
margin: 0 0 10px;
text-align: right;
color: #CD202C;
}
#login a {
background-color: #d3dce0;
margin-left: 10px;
margin-right: 3px;
padding: 2px 3px;
text-decoration: none;
}
#login a.username {
background: none;
margin: 0;
padding: 0;
text-decoration: underline;
}
#login ul {
margin: 0;
}
#login li {
display: inline;
list-style: none;
}
ul#menu {
font-size: 1.2em;
font-weight: 600;
color: #606060;
margin: 0 0 5px;
padding: 0;
text-align: right;
}
ul#menu li {
display: inline;
list-style: none;
padding-left: 15px;
}
ul#menu li a {
background: none;
color: #606060;
text-decoration: none;
}
ul#menu a:hover {
color: #CD202C;
}
ul#menu-body{
font-size: 1.2em;
font-weight: 600;
margin: 0 0 5px;
padding: 10px;
text-align: center;
}
ul#menu-body li{
display: inline;
list-style: none;
padding-left: 15px;
}
ul#menu-body li a {
background: none;
color: #606060;
text-decoration: none;
}
ul#menu-body a:hover {
color: #d10000;
}
ul#menu-body .rost a{
color: #CD202C;
background-color: #fafafa;
padding:10px 1px 10px 1px;
}
.featured {
background-color: #fff;
}
.featured .content-wrapper {
background-color: #7ac0da;
background-image: -ms-linear-gradient(left, #7ac0da 0%, #a4d4e6 100%);
background-image: -o-linear-gradient(left, #7ac0da 0%, #a4d4e6 100%);
background-image: -webkit-gradient(linear, left top, right top, color-stop(0, #7ac0da), color-stop(1, #a4d4e6));
background-image: -webkit-linear-gradient(left, #7ac0da 0%, #a4d4e6 100%);
background-image: linear-gradient(left, #7ac0da 0%, #a4d4e6 100%);
color: #3e5667;
padding: 20px 40px 30px 40px;
}
.featured hgroup.title h1, .featured hgroup.title h2 {
color: #fff;
}
.featured p {
font-size: 1.1em;
}
hgroup.title {
margin-bottom: 10px;
}
hgroup.title h1, hgroup.title h2 {
display: inline;
}
hgroup.title h2 {
font-weight: normal;
margin-left: 3px;
}
section.feature {
width: 300px;
float: left;
padding: 10px;
}
aside ul {
list-style: none;
padding: 0;
}
aside ul li {
background: url("../Images/bullet.png") no-repeat 0 50%;
padding: 2px 0 2px 20px;
}
.label {
font-weight: 700;
}
#loginForm {
border-right: solid 2px #c8c8c8;
float: left;
width: 55%;
}
#loginForm .validation-error {
display: block;
margin-left: 15px;
}
#loginForm .validation-summary-errors ul {
margin: 0;
padding: 0;
}
#loginForm .validation-summary-errors li {
display: inline;
list-style: none;
margin: 0;
}
#loginForm input {
width: 250px;
}
#loginForm input[type="checkbox"],
#loginForm input[type="submit"],
#loginForm input[type="button"],
#loginForm button {
width: auto;
}
#socialLoginForm {
margin-left: 40px;
float: left;
width: 40%;
}
#socialLoginForm h2 {
margin-bottom: 5px;
}
#socialLoginList button {
margin-bottom: 12px;
}
#logoutForm {
display: inline;
}
.contact h3 {
font-size: 1.2em;
}
.contact p {
margin: 5px 0 0 10px;
}
.contact iframe {
border: 1px solid #333;
margin: 5px 0 0 10px;
}
fieldset {
border: none;
margin: 0;
padding: 0;
}
fieldset legend {
display: none;
}
fieldset ol {
padding: 0;
list-style: none;
}
fieldset ol li {
padding-bottom: 5px;
}
label {
display: block;
font-size: 1.2em;
font-weight: 600;
}
label.checkbox {
display: inline;
}
input, textarea {
border: 1px solid #e2e2e2;
background: #fff;
color: #333;
font-size: 1.2em;
margin: 5px 0 6px 0;
padding: 5px;
width: 300px;
}
textarea {
font-family: inherit;
width: 500px;
}
input:focus, textarea:focus {
border: 1px solid #7ac0da;
}
input[type="checkbox"] {
background: transparent;
border: inherit;
width: auto;
}
input[type="submit"],
input[type="button"],
button {
background-color: #d3dce0;
border: 1px solid #787878;
cursor: pointer;
font-size: 1.2em;
font-weight: 600;
padding: 7px;
margin-right: 8px;
width: auto;
}
td input[type="submit"],
td input[type="button"],
td button {
font-size: 1em;
padding: 4px;
margin-right: 4px;
}
.message-info {
border: 1px solid;
clear: both;
padding: 10px 20px;
}
.message-error {
clear: both;
color: #e80c4d;
font-size: 1.1em;
font-weight: bold;
margin: 20px 0 10px 0;
}
.message-success {
color: #7ac0da;
font-size: 1.3em;
font-weight: bold;
margin: 20px 0 10px 0;
}
.error {
color: #e80c4d;
}
.field-validation-error {
color: #e80c4d;
font-weight: bold;
}
.field-validation-valid {
display: none;
}
input.input-validation-error {
border: 1px solid #e80c4d;
}
input[type="checkbox"].input-validation-error {
border: 0 none;
}
.validation-summary-errors {
color: #e80c4d;
font-size: 1.1em;
}
.validation-summary-valid {
display: none;
}
body.simple-little-table {
width: 960px;
max-width: 960px;
overflow-x: scroll;
}
.simple-little-table {
width: 960px;
font-family:"Segoe UI", Arial, Verdana, Helvetica, sans-serif;
color:#666;
font-size:13px;
background:#828282;
border-collapse: collapse;
border: 1px solid #606060;
-moz-border-radius:3px;
-webkit-border-radius:3px;
border-radius:3px;
-moz-box-shadow: 0 1px 2px #d1d1d1;
-webkit-box-shadow: 0 1px 2px #d1d1d1;
box-shadow: 0 1px 2px #d1d1d1;
}
.simple-little-table th {
font-weight:bold;
padding:5px 5px 5px 5px;
border-top:1px solid #606060;
border-bottom:1px solid #606060;
background: #ededed;
background: -webkit-gradient(linear, left top, left bottom, from(#ededed), to(#ebebeb));
background: -moz-linear-gradient(top, #ededed, #ebebeb);
}
.simple-little-table tr:first-child th:first-child{
-moz-border-radius-topleft:3px;
-webkit-border-top-left-radius:3px;
border-top-left-radius:3px;
}
.simple-little-table tr:first-child th:last-child{
-moz-border-radius-topright:3px;
-webkit-border-top-right-radius:3px;
border-top-right-radius:3px;
}
.simple-little-table tr{
text-align: center;
}
.simple-little-table tr td:first-child{
text-align: left;
padding-left: 5px;
border-left: 0;
}
.simple-little-table tr td {
border-top: 1px solid #ffffff;
border-bottom:1px solid #e0e0e0;
border-left: 1px solid #e0e0e0;
background: #fafafa;
background: -webkit-gradient(linear, left top, left bottom, from(#fbfbfb), to(#fafafa));
background: -moz-linear-gradient(top, #fbfbfb, #fafafa);
}
.simple-little-table tr:nth-child(even) td{
background: #f6f6f6;
background: -webkit-gradient(linear, left top, left bottom, from(#f8f8f8), to(#f6f6f6));
background: -moz-linear-gradient(top, #f8f8f8, #f6f6f6);
}
.simple-little-table tr:last-child td{
border-bottom:0;
}
.simple-little-table tr:last-child td:first-child{
-moz-border-radius-bottomleft:3px;
-webkit-border-bottom-left-radius:3px;
border-bottom-left-radius:3px;
}
.simple-little-table tr:last-child td:last-child{
-moz-border-radius-bottomright:3px;
-webkit-border-bottom-right-radius:3px;
border-bottom-right-radius:3px;
}
.simple-little-table tr:hover td{
background: #f2f2f2;
background: -webkit-gradient(linear, left top, left bottom, from(#f2f2f2), to(#f0f0f0));
background: -moz-linear-gradient(top, #f2f2f2, #f0f0f0);
}
.simple-little-table a:active,
.simple-little-table a:hover {
text-decoration:none;
}
footer .float-left,
footer .float-right {
float: none;
}
footer {
text-align: center;
height: auto;
padding: 10px 0;
}
footer p {
margin: 0;
color:#c10000;
}
}
Приложение Б
(справочное)
Листинг контроллера «HomeController.cs»
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MVCintranet.Models;
namespace MVCintranet.Controllers
{
public class HomeController : Controller{
MAO2Context db = new MAO2Context();
private int PageSize = 20;
public string Zone = "96-ДВС";
private void ViewGo(int PageNum, int ItemsCount, string Сriterion = "", string Category = "")
{
ViewData["PageNum"] = PageNum;
ViewData["PageSize"] = PageSize;
ViewData["ItemsCount"] = ItemsCount;
ViewData["СRITERION"] = Сriterion;
ViewData["CATEGORY"] = Category;
}
public ActionResult Index(string Сriterion)
{
if (!String.IsNullOrEmpty(Сriterion))
{
MainInfo<ЭК> EK = new MainInfo<ЭК>();
var spisok = (from i in db.ЭК_связи where i.ЭК == Сriterion orderby i.ЭК select i).ToList();
ViewData["Criterion"] = Сriterion;
ViewData["ItemsCount"] = spisok.Count();
ViewData["MainInfo"] = EK.Information(Сriterion).ToArray();
return View(spisok);
}
return View();
}
public ActionResult Staff(string Сriterion, string Category, int PageNum = 0, string Zone="96-ДВС")
{
string zapros = "select * from сотрудники where ЗОНА_ОТВЕТСТВЕННОСТИ = '" + Zone +"'";
if (!String.IsNullOrEmpty(Сriterion) && !String.IsNullOrEmpty(Category))
{
zapros += "and " + Category + " = '" + Сriterion + "'";
}
var all = db.Database.SqlQuery<сотрудники>(zapros);
var spisok = all.Skip(PageSize * PageNum).Take(PageSize).ToList();
ViewGo(PageNum, all.Count(), Сriterion, Category);
return View(spisok);
}
public ActionResult About()
{
Statistics Data = new Statistics();
return View(new[]
{
new Statistics {Name = "Инциденты", Kol = Data.KolInc(Zone)},
new Statistics {Name = "Проблемы", Kol = Data.KolProb(Zone)},
new Statistics {Name = "Изменения", Kol = Data.KolIzm(Zone)},
new Statistics {Name = "Обращения", Kol = Data.KolObr(Zone)},
new Statistics {Name = "Регламентные работы",
Kol = Data.KolRegWorks(Zone)}
});
}
protected override void Dispose(bool disposing)
{
db.Dispose();
base.Dispose(disposing);
}
}
}
Приложение В
(справочное)
Листинг класса «Statistics.cs»
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MVCintranet.Models;
namespace MVCintranet.Models
{















