Add project files.
parent
07bfd9d5f1
commit
12c4a6b82c
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"isRoot": true,
|
||||||
|
"tools": {
|
||||||
|
"dotnet-ef": {
|
||||||
|
"version": "3.1.2",
|
||||||
|
"commands": [
|
||||||
|
"dotnet-ef"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,152 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Moshaverino.Core.Models;
|
||||||
|
|
||||||
|
namespace Moshaverino.Core.Controllers
|
||||||
|
{
|
||||||
|
public class AdminController : Controller
|
||||||
|
{
|
||||||
|
private readonly MoshaverinoContext _context;
|
||||||
|
|
||||||
|
public AdminController(MoshaverinoContext context)
|
||||||
|
{
|
||||||
|
_context = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: Admin
|
||||||
|
public async Task<IActionResult> Index()
|
||||||
|
{
|
||||||
|
return View(new List<Student>());
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: Admin/Details/5
|
||||||
|
public async Task<IActionResult> Details(int? id)
|
||||||
|
{
|
||||||
|
if (id == null)
|
||||||
|
{
|
||||||
|
return NotFound();
|
||||||
|
}
|
||||||
|
|
||||||
|
var student = await _context.Students
|
||||||
|
.FirstOrDefaultAsync(m => m.StudentId == id);
|
||||||
|
if (student == null)
|
||||||
|
{
|
||||||
|
return NotFound();
|
||||||
|
}
|
||||||
|
|
||||||
|
return View(student);
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: Admin/Create
|
||||||
|
public IActionResult Create()
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: Admin/Create
|
||||||
|
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||||
|
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||||
|
[HttpPost]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
|
public async Task<IActionResult> Create([Bind("StudentId,PhoneNumber,Code,HumenSex,FullName,StudyField,StudyGrade,AverageNumber,FavoriteLesson,UnFavoriteLesson,FavoriteExam,AverageTaraz,CreationTime,RemoveTime,IsRemoved")] Student student)
|
||||||
|
{
|
||||||
|
if (ModelState.IsValid)
|
||||||
|
{
|
||||||
|
_context.Add(student);
|
||||||
|
await _context.SaveChangesAsync();
|
||||||
|
return RedirectToAction(nameof(Index));
|
||||||
|
}
|
||||||
|
return View(student);
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: Admin/Edit/5
|
||||||
|
public async Task<IActionResult> Edit(int? id)
|
||||||
|
{
|
||||||
|
if (id == null)
|
||||||
|
{
|
||||||
|
return NotFound();
|
||||||
|
}
|
||||||
|
|
||||||
|
var student = await _context.Students.FindAsync(id);
|
||||||
|
if (student == null)
|
||||||
|
{
|
||||||
|
return NotFound();
|
||||||
|
}
|
||||||
|
return View(student);
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: Admin/Edit/5
|
||||||
|
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||||
|
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||||
|
[HttpPost]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
|
public async Task<IActionResult> Edit(int id, [Bind("StudentId,PhoneNumber,Code,HumenSex,FullName,StudyField,StudyGrade,AverageNumber,FavoriteLesson,UnFavoriteLesson,FavoriteExam,AverageTaraz,CreationTime,RemoveTime,IsRemoved")] Student student)
|
||||||
|
{
|
||||||
|
if (id != student.StudentId)
|
||||||
|
{
|
||||||
|
return NotFound();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ModelState.IsValid)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
_context.Update(student);
|
||||||
|
await _context.SaveChangesAsync();
|
||||||
|
}
|
||||||
|
catch (DbUpdateConcurrencyException)
|
||||||
|
{
|
||||||
|
if (!StudentExists(student.StudentId))
|
||||||
|
{
|
||||||
|
return NotFound();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return RedirectToAction(nameof(Index));
|
||||||
|
}
|
||||||
|
return View(student);
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: Admin/Delete/5
|
||||||
|
public async Task<IActionResult> Delete(int? id)
|
||||||
|
{
|
||||||
|
if (id == null)
|
||||||
|
{
|
||||||
|
return NotFound();
|
||||||
|
}
|
||||||
|
|
||||||
|
var student = await _context.Students
|
||||||
|
.FirstOrDefaultAsync(m => m.StudentId == id);
|
||||||
|
if (student == null)
|
||||||
|
{
|
||||||
|
return NotFound();
|
||||||
|
}
|
||||||
|
|
||||||
|
return View(student);
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: Admin/Delete/5
|
||||||
|
[HttpPost, ActionName("Delete")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
|
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||||
|
{
|
||||||
|
var student = await _context.Students.FindAsync(id);
|
||||||
|
_context.Students.Remove(student);
|
||||||
|
await _context.SaveChangesAsync();
|
||||||
|
return RedirectToAction(nameof(Index));
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool StudentExists(int id)
|
||||||
|
{
|
||||||
|
return _context.Students.Any(e => e.StudentId == id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,114 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Kavenegar;
|
||||||
|
using Kavenegar.Core.Exceptions;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Moshaverino.Core.Models;
|
||||||
|
|
||||||
|
namespace Moshaverino.Core.Controllers
|
||||||
|
{
|
||||||
|
[Route("api/[controller]")]
|
||||||
|
[ApiController]
|
||||||
|
public class StudentController : Controller
|
||||||
|
{
|
||||||
|
private readonly MoshaverinoContext _context;
|
||||||
|
public StudentController(MoshaverinoContext context)
|
||||||
|
{
|
||||||
|
_context = context;
|
||||||
|
}
|
||||||
|
[HttpPost("Code")]
|
||||||
|
public async Task<IActionResult> GetCode(string phoneNumber)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (IsStudentExist(phoneNumber))
|
||||||
|
{
|
||||||
|
var student = _context.Students.FirstOrDefault(u => u.PhoneNumber == phoneNumber);
|
||||||
|
SendSms(student.PhoneNumber, student.Code);
|
||||||
|
return Ok(student);
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var st = new Student
|
||||||
|
{
|
||||||
|
PhoneNumber = phoneNumber,
|
||||||
|
Code = GetRandomCode()
|
||||||
|
};
|
||||||
|
_context.Students.Add(st);
|
||||||
|
_context.SaveChanges();
|
||||||
|
SendSms(st.PhoneNumber, st.Code);
|
||||||
|
return Ok(st);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return BadRequest(e.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[HttpGet("Code")]
|
||||||
|
public async Task<IActionResult> CheckCode(string code)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return Ok(_context.Students.Any(s=>s.Code==code));
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return BadRequest(e.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost("SetInfo")]
|
||||||
|
public async Task<IActionResult> SetStudentInfo(Student student)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
_context.Entry<Student>(student).State = EntityState.Modified;
|
||||||
|
_context.SaveChanges();
|
||||||
|
return Ok(student);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return BadRequest(e.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool IsStudentExist(string phoneNumber)
|
||||||
|
{
|
||||||
|
return _context.Students.Any(s => s.PhoneNumber == phoneNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task<bool> SendSms(string phoneNumber, string code)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var api = new KavenegarApi(
|
||||||
|
"32433666522B516838714779627679525877746E457337536A377663526A543265646650372F456F774F413D");
|
||||||
|
var result = await api.VerifyLookup(phoneNumber, code, "verifyPhone");
|
||||||
|
if (result.Status == 200)
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
catch (ApiException e)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetRandomCode()
|
||||||
|
{
|
||||||
|
Random random = new Random(DateTime.Now.Millisecond);
|
||||||
|
var code = random.Next(111111, 999999);
|
||||||
|
if (_context.Students.Any(s => s.Code == code.ToString()))
|
||||||
|
return GetRandomCode();
|
||||||
|
else
|
||||||
|
return code.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Moshaverino.Core.Models;
|
||||||
|
|
||||||
|
namespace Moshaverino.Core
|
||||||
|
{
|
||||||
|
public class DBInitializer
|
||||||
|
{
|
||||||
|
private readonly MoshaverinoContext _context;
|
||||||
|
public DBInitializer(MoshaverinoContext context)
|
||||||
|
{
|
||||||
|
_context = context;
|
||||||
|
}
|
||||||
|
public void Seed()
|
||||||
|
{
|
||||||
|
|
||||||
|
//_context.Database.Migrate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,80 @@
|
||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using Moshaverino.Core.Models;
|
||||||
|
|
||||||
|
namespace Moshaverino.Core.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(MoshaverinoContext))]
|
||||||
|
[Migration("20200305121542_init")]
|
||||||
|
partial class init
|
||||||
|
{
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "3.1.2")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 128)
|
||||||
|
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||||
|
|
||||||
|
modelBuilder.Entity("Moshaverino.Core.Models.Student", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("StudentId")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||||
|
|
||||||
|
b.Property<string>("AverageNumber")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("AverageTaraz")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Code")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("FavoriteExam")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("FavoriteLesson")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("FullName")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("HumenSex")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<bool>("IsRemoved")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("PhoneNumber")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("RemoveTime")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("StudyField")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("StudyGrade")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("UnFavoriteLesson")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("StudentId");
|
||||||
|
|
||||||
|
b.ToTable("Students");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace Moshaverino.Core.Migrations
|
||||||
|
{
|
||||||
|
public partial class init : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Students",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
StudentId = table.Column<int>(nullable: false)
|
||||||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
|
CreationTime = table.Column<DateTime>(nullable: false),
|
||||||
|
RemoveTime = table.Column<DateTime>(nullable: false),
|
||||||
|
IsRemoved = table.Column<bool>(nullable: false),
|
||||||
|
PhoneNumber = table.Column<string>(nullable: true),
|
||||||
|
Code = table.Column<string>(nullable: true),
|
||||||
|
HumenSex = table.Column<int>(nullable: false),
|
||||||
|
FullName = table.Column<string>(nullable: true),
|
||||||
|
StudyField = table.Column<string>(nullable: true),
|
||||||
|
StudyGrade = table.Column<string>(nullable: true),
|
||||||
|
AverageNumber = table.Column<string>(nullable: true),
|
||||||
|
FavoriteLesson = table.Column<string>(nullable: true),
|
||||||
|
UnFavoriteLesson = table.Column<string>(nullable: true),
|
||||||
|
FavoriteExam = table.Column<string>(nullable: true),
|
||||||
|
AverageTaraz = table.Column<string>(nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Students", x => x.StudentId);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Students");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,78 @@
|
||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using Moshaverino.Core.Models;
|
||||||
|
|
||||||
|
namespace Moshaverino.Core.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(MoshaverinoContext))]
|
||||||
|
partial class MoshaverinoContextModelSnapshot : ModelSnapshot
|
||||||
|
{
|
||||||
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "3.1.2")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 128)
|
||||||
|
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||||
|
|
||||||
|
modelBuilder.Entity("Moshaverino.Core.Models.Student", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("StudentId")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||||
|
|
||||||
|
b.Property<string>("AverageNumber")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("AverageTaraz")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Code")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("FavoriteExam")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("FavoriteLesson")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("FullName")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("HumenSex")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<bool>("IsRemoved")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("PhoneNumber")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("RemoveTime")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("StudyField")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("StudyGrade")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("UnFavoriteLesson")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("StudentId");
|
||||||
|
|
||||||
|
b.ToTable("Students");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Moshaverino.Core.Models
|
||||||
|
{
|
||||||
|
public class Entity
|
||||||
|
{
|
||||||
|
public DateTime CreationTime { get; set; }
|
||||||
|
public DateTime RemoveTime { get; set; }
|
||||||
|
public bool IsRemoved { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
namespace Moshaverino.Core.Models
|
||||||
|
{
|
||||||
|
public class MoshaverinoContext : DbContext
|
||||||
|
{
|
||||||
|
public MoshaverinoContext(DbContextOptions<MoshaverinoContext> contextOptions) : base(contextOptions) { }
|
||||||
|
public DbSet<Student> Students { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Moshaverino.Core.Models
|
||||||
|
{
|
||||||
|
public enum HumenSex
|
||||||
|
{
|
||||||
|
Male,
|
||||||
|
Female
|
||||||
|
}
|
||||||
|
public class Student : Entity
|
||||||
|
{
|
||||||
|
public int StudentId { get; set; }
|
||||||
|
public string PhoneNumber { get; set; }
|
||||||
|
public string Code { get; set; }
|
||||||
|
public HumenSex HumenSex { get; set; }
|
||||||
|
public string FullName { get; set; }
|
||||||
|
public string StudyField { get; set; }
|
||||||
|
public string StudyGrade { get; set; }
|
||||||
|
public string AverageNumber { get; set; }
|
||||||
|
public string FavoriteLesson { get; set; }
|
||||||
|
public string UnFavoriteLesson { get; set; }
|
||||||
|
public string FavoriteExam { get; set; }
|
||||||
|
public string AverageTaraz { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="bootstrap" Version="4.4.1" />
|
||||||
|
<PackageReference Include="Bootstrap.v3.Datetimepicker.CSS" Version="4.17.45" />
|
||||||
|
<PackageReference Include="Kavenegar.Core" Version="1.0.1-alpha3" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.2" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.2">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.2" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.1" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.2" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.2">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.1" />
|
||||||
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="Properties\PublishProfiles\" />
|
||||||
|
<Folder Include="wwwroot\css\" />
|
||||||
|
<Folder Include="wwwroot\js\" />
|
||||||
|
<Folder Include="wwwroot\lib\" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
||||||
|
</Project>
|
|
@ -0,0 +1,31 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
namespace Moshaverino.Core
|
||||||
|
{
|
||||||
|
public class Program
|
||||||
|
{
|
||||||
|
public static void Main(string[] args)
|
||||||
|
{
|
||||||
|
var host = CreateHostBuilder(args).Build();
|
||||||
|
using (var scop = host.Services.CreateScope())
|
||||||
|
{
|
||||||
|
var init = scop.ServiceProvider.GetService<DBInitializer>();
|
||||||
|
init.Seed();
|
||||||
|
}
|
||||||
|
host.Run();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
||||||
|
Host.CreateDefaultBuilder(args)
|
||||||
|
.ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup<Startup>(); });
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
"iisSettings": {
|
||||||
|
"windowsAuthentication": false,
|
||||||
|
"anonymousAuthentication": true,
|
||||||
|
"iis": {
|
||||||
|
"applicationUrl": "http://localhost/Moshaverino.Core",
|
||||||
|
"sslPort": 0
|
||||||
|
},
|
||||||
|
"iisExpress": {
|
||||||
|
"applicationUrl": "http://localhost:62091",
|
||||||
|
"sslPort": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"$schema": "http://json.schemastore.org/launchsettings.json",
|
||||||
|
"profiles": {
|
||||||
|
"IIS Express": {
|
||||||
|
"commandName": "IIS",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"launchUrl": "weatherforecast",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Moshaverino.Core": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"launchUrl": "weatherforecast",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
},
|
||||||
|
"applicationUrl": "http://localhost:5000"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,87 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.OpenApi.Models;
|
||||||
|
using Moshaverino.Core.Models;
|
||||||
|
|
||||||
|
namespace Moshaverino.Core
|
||||||
|
{
|
||||||
|
public class Startup
|
||||||
|
{
|
||||||
|
public Startup(IConfiguration configuration)
|
||||||
|
{
|
||||||
|
Configuration = configuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
//public static string baseAddress = "http://itrip-co.com";
|
||||||
|
public static string baseAddress = "http://localhost";
|
||||||
|
public IConfiguration Configuration { get; }
|
||||||
|
|
||||||
|
// This method gets called by the runtime. Use this method to add services to the container.
|
||||||
|
public void ConfigureServices(IServiceCollection services)
|
||||||
|
{
|
||||||
|
services.AddSwaggerGen(swagger =>
|
||||||
|
{
|
||||||
|
swagger.SwaggerDoc("v1", new OpenApiInfo
|
||||||
|
{
|
||||||
|
Title = "Moshaverino Api"
|
||||||
|
});
|
||||||
|
//swagger.IncludeXmlComments(Path.Combine(Directory.GetCurrentDirectory(), "DarvagApi.xml"));
|
||||||
|
});
|
||||||
|
services.AddControllers();
|
||||||
|
services.AddDbContext<MoshaverinoContext>(options =>
|
||||||
|
{
|
||||||
|
//options.UseSqlServer(Configuration.GetConnectionString("LocalConnection"));
|
||||||
|
options.UseSqlServer("Data Source=localhost;Initial Catalog=konkuric_moshaverino;Integrated Security=False;User ID=konkuric_dbadmin;Password=Amdemon@1377;Connect Timeout=15;Encrypt=False;Packet Size=4096");
|
||||||
|
});
|
||||||
|
services.AddScoped<DBInitializer>();
|
||||||
|
services.AddMvc(optione => optione.EnableEndpointRouting = false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||||
|
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||||
|
{
|
||||||
|
if (env.IsDevelopment())
|
||||||
|
{
|
||||||
|
app.UseDeveloperExceptionPage();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
app.UseRouting();
|
||||||
|
app.UseSwagger();
|
||||||
|
app.UseStaticFiles();
|
||||||
|
app.UseDefaultFiles(new DefaultFilesOptions
|
||||||
|
{
|
||||||
|
DefaultFileNames = new
|
||||||
|
List<string> { "Index.chtml" }
|
||||||
|
});
|
||||||
|
app.UseSwaggerUI(c =>
|
||||||
|
{
|
||||||
|
|
||||||
|
c.SwaggerEndpoint($"{baseAddress}/swagger/v1/swagger.json", "iTRiP v1");
|
||||||
|
|
||||||
|
});
|
||||||
|
app.UseAuthorization();
|
||||||
|
|
||||||
|
app.UseMvc(routes =>
|
||||||
|
{
|
||||||
|
routes.MapRoute(
|
||||||
|
name: "default",
|
||||||
|
template: "{controller=Admin}/{action=Index}");
|
||||||
|
});
|
||||||
|
app.UseEndpoints(endpoints =>
|
||||||
|
{
|
||||||
|
endpoints.MapControllers();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,98 @@
|
||||||
|
@model Moshaverino.Core.Models.Student
|
||||||
|
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "Create";
|
||||||
|
}
|
||||||
|
|
||||||
|
<h1>Create</h1>
|
||||||
|
|
||||||
|
<h4>Student</h4>
|
||||||
|
<hr />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<form asp-action="Create">
|
||||||
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="PhoneNumber" class="control-label"></label>
|
||||||
|
<input asp-for="PhoneNumber" class="form-control" />
|
||||||
|
<span asp-validation-for="PhoneNumber" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="Code" class="control-label"></label>
|
||||||
|
<input asp-for="Code" class="form-control" />
|
||||||
|
<span asp-validation-for="Code" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="HumenSex" class="control-label"></label>
|
||||||
|
<select asp-for="HumenSex" class="form-control"></select>
|
||||||
|
<span asp-validation-for="HumenSex" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="FullName" class="control-label"></label>
|
||||||
|
<input asp-for="FullName" class="form-control" />
|
||||||
|
<span asp-validation-for="FullName" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="StudyField" class="control-label"></label>
|
||||||
|
<input asp-for="StudyField" class="form-control" />
|
||||||
|
<span asp-validation-for="StudyField" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="StudyGrade" class="control-label"></label>
|
||||||
|
<input asp-for="StudyGrade" class="form-control" />
|
||||||
|
<span asp-validation-for="StudyGrade" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="AverageNumber" class="control-label"></label>
|
||||||
|
<input asp-for="AverageNumber" class="form-control" />
|
||||||
|
<span asp-validation-for="AverageNumber" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="FavoriteLesson" class="control-label"></label>
|
||||||
|
<input asp-for="FavoriteLesson" class="form-control" />
|
||||||
|
<span asp-validation-for="FavoriteLesson" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="UnFavoriteLesson" class="control-label"></label>
|
||||||
|
<input asp-for="UnFavoriteLesson" class="form-control" />
|
||||||
|
<span asp-validation-for="UnFavoriteLesson" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="FavoriteExam" class="control-label"></label>
|
||||||
|
<input asp-for="FavoriteExam" class="form-control" />
|
||||||
|
<span asp-validation-for="FavoriteExam" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="AverageTaraz" class="control-label"></label>
|
||||||
|
<input asp-for="AverageTaraz" class="form-control" />
|
||||||
|
<span asp-validation-for="AverageTaraz" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="CreationTime" class="control-label"></label>
|
||||||
|
<input asp-for="CreationTime" class="form-control" />
|
||||||
|
<span asp-validation-for="CreationTime" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="RemoveTime" class="control-label"></label>
|
||||||
|
<input asp-for="RemoveTime" class="form-control" />
|
||||||
|
<span asp-validation-for="RemoveTime" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-check">
|
||||||
|
<label class="form-check-label">
|
||||||
|
<input class="form-check-input" asp-for="IsRemoved" /> @Html.DisplayNameFor(model => model.IsRemoved)
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="submit" value="Create" class="btn btn-primary" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<a asp-action="Index">Back to List</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@section Scripts {
|
||||||
|
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
|
||||||
|
}
|
|
@ -0,0 +1,105 @@
|
||||||
|
@model Moshaverino.Core.Models.Student
|
||||||
|
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "Delete";
|
||||||
|
}
|
||||||
|
|
||||||
|
<h1>Delete</h1>
|
||||||
|
|
||||||
|
<h3>Are you sure you want to delete this?</h3>
|
||||||
|
<div>
|
||||||
|
<h4>Student</h4>
|
||||||
|
<hr />
|
||||||
|
<dl class="row">
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.PhoneNumber)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.PhoneNumber)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.Code)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.Code)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.HumenSex)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.HumenSex)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.FullName)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.FullName)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.StudyField)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.StudyField)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.StudyGrade)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.StudyGrade)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.AverageNumber)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.AverageNumber)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.FavoriteLesson)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.FavoriteLesson)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.UnFavoriteLesson)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.UnFavoriteLesson)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.FavoriteExam)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.FavoriteExam)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.AverageTaraz)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.AverageTaraz)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.CreationTime)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.CreationTime)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.RemoveTime)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.RemoveTime)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.IsRemoved)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.IsRemoved)
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
<form asp-action="Delete">
|
||||||
|
<input type="hidden" asp-for="StudentId" />
|
||||||
|
<input type="submit" value="Delete" class="btn btn-danger" /> |
|
||||||
|
<a asp-action="Index">Back to List</a>
|
||||||
|
</form>
|
||||||
|
</div>
|
|
@ -0,0 +1,102 @@
|
||||||
|
@model Moshaverino.Core.Models.Student
|
||||||
|
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "Details";
|
||||||
|
}
|
||||||
|
|
||||||
|
<h1>Details</h1>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h4>Student</h4>
|
||||||
|
<hr />
|
||||||
|
<dl class="row">
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.PhoneNumber)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.PhoneNumber)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.Code)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.Code)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.HumenSex)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.HumenSex)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.FullName)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.FullName)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.StudyField)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.StudyField)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.StudyGrade)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.StudyGrade)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.AverageNumber)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.AverageNumber)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.FavoriteLesson)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.FavoriteLesson)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.UnFavoriteLesson)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.UnFavoriteLesson)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.FavoriteExam)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.FavoriteExam)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.AverageTaraz)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.AverageTaraz)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.CreationTime)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.CreationTime)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.RemoveTime)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.RemoveTime)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.IsRemoved)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.IsRemoved)
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a asp-action="Edit" asp-route-id="@Model.StudentId">Edit</a> |
|
||||||
|
<a asp-action="Index">Back to List</a>
|
||||||
|
</div>
|
|
@ -0,0 +1,99 @@
|
||||||
|
@model Moshaverino.Core.Models.Student
|
||||||
|
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "Edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
<h1>Edit</h1>
|
||||||
|
|
||||||
|
<h4>Student</h4>
|
||||||
|
<hr />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<form asp-action="Edit">
|
||||||
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||||
|
<input type="hidden" asp-for="StudentId" />
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="PhoneNumber" class="control-label"></label>
|
||||||
|
<input asp-for="PhoneNumber" class="form-control" />
|
||||||
|
<span asp-validation-for="PhoneNumber" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="Code" class="control-label"></label>
|
||||||
|
<input asp-for="Code" class="form-control" />
|
||||||
|
<span asp-validation-for="Code" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="HumenSex" class="control-label"></label>
|
||||||
|
<select asp-for="HumenSex" class="form-control"></select>
|
||||||
|
<span asp-validation-for="HumenSex" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="FullName" class="control-label"></label>
|
||||||
|
<input asp-for="FullName" class="form-control" />
|
||||||
|
<span asp-validation-for="FullName" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="StudyField" class="control-label"></label>
|
||||||
|
<input asp-for="StudyField" class="form-control" />
|
||||||
|
<span asp-validation-for="StudyField" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="StudyGrade" class="control-label"></label>
|
||||||
|
<input asp-for="StudyGrade" class="form-control" />
|
||||||
|
<span asp-validation-for="StudyGrade" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="AverageNumber" class="control-label"></label>
|
||||||
|
<input asp-for="AverageNumber" class="form-control" />
|
||||||
|
<span asp-validation-for="AverageNumber" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="FavoriteLesson" class="control-label"></label>
|
||||||
|
<input asp-for="FavoriteLesson" class="form-control" />
|
||||||
|
<span asp-validation-for="FavoriteLesson" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="UnFavoriteLesson" class="control-label"></label>
|
||||||
|
<input asp-for="UnFavoriteLesson" class="form-control" />
|
||||||
|
<span asp-validation-for="UnFavoriteLesson" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="FavoriteExam" class="control-label"></label>
|
||||||
|
<input asp-for="FavoriteExam" class="form-control" />
|
||||||
|
<span asp-validation-for="FavoriteExam" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="AverageTaraz" class="control-label"></label>
|
||||||
|
<input asp-for="AverageTaraz" class="form-control" />
|
||||||
|
<span asp-validation-for="AverageTaraz" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="CreationTime" class="control-label"></label>
|
||||||
|
<input asp-for="CreationTime" class="form-control" />
|
||||||
|
<span asp-validation-for="CreationTime" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="RemoveTime" class="control-label"></label>
|
||||||
|
<input asp-for="RemoveTime" class="form-control" />
|
||||||
|
<span asp-validation-for="RemoveTime" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-check">
|
||||||
|
<label class="form-check-label">
|
||||||
|
<input class="form-check-input" asp-for="IsRemoved" /> @Html.DisplayNameFor(model => model.IsRemoved)
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="submit" value="Save" class="btn btn-primary" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<a asp-action="Index">Back to List</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@section Scripts {
|
||||||
|
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
|
||||||
|
}
|
|
@ -0,0 +1,113 @@
|
||||||
|
@model IEnumerable<Moshaverino.Core.Models.Student>
|
||||||
|
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "Index";
|
||||||
|
}
|
||||||
|
|
||||||
|
<h1>Index</h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<a asp-action="Create">Create New</a>
|
||||||
|
</p>
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.PhoneNumber)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.Code)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.HumenSex)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.FullName)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.StudyField)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.StudyGrade)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.AverageNumber)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.FavoriteLesson)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.UnFavoriteLesson)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.FavoriteExam)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.AverageTaraz)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.CreationTime)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.RemoveTime)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.IsRemoved)
|
||||||
|
</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach (var item in Model) {
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.PhoneNumber)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.Code)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.HumenSex)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.FullName)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.StudyField)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.StudyGrade)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.AverageNumber)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.FavoriteLesson)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.UnFavoriteLesson)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.FavoriteExam)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.AverageTaraz)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.CreationTime)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.RemoveTime)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.IsRemoved)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a asp-action="Edit" asp-route-id="@item.StudentId">Edit</a> |
|
||||||
|
<a asp-action="Details" asp-route-id="@item.StudentId">Details</a> |
|
||||||
|
<a asp-action="Delete" asp-route-id="@item.StudentId">Delete</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
|
@ -0,0 +1,41 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>@ViewData["Title"]</title>
|
||||||
|
|
||||||
|
<environment exclude="Development">
|
||||||
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
|
||||||
|
asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
|
||||||
|
asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"/>
|
||||||
|
</environment>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<environment include="Development">
|
||||||
|
<script src="~/lib/jquery/dist/jquery.js"></script>
|
||||||
|
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.js"></script>
|
||||||
|
</environment>
|
||||||
|
<environment exclude="Development">
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"
|
||||||
|
asp-fallback-src="~/lib/jquery/dist/jquery.min.js"
|
||||||
|
asp-fallback-test="window.jQuery"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=">
|
||||||
|
</script>
|
||||||
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.bundle.min.js"
|
||||||
|
asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"
|
||||||
|
asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
integrity="sha384-xrRywqdh3PHs8keKZN+8zzc5TX0GRTLCcmivcbNJWm2rs5C8PRhcEn3czEjhAO9o">
|
||||||
|
</script>
|
||||||
|
</environment>
|
||||||
|
<script src="~/lib/bootstrap/dist/js/bootstrap.js" asp-append-version="true"></script>
|
||||||
|
|
||||||
|
@RenderBody()
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,18 @@
|
||||||
|
<environment names="Development">
|
||||||
|
<script src="~/lib/jquery-validation/dist/jquery.validate.js"></script>
|
||||||
|
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>
|
||||||
|
</environment>
|
||||||
|
<environment names="Staging,Production">
|
||||||
|
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.17.0/jquery.validate.min.js"
|
||||||
|
asp-fallback-src="~/lib/jquery-validation/dist/jquery.validate.min.js"
|
||||||
|
asp-fallback-test="window.jQuery && window.jQuery.validator"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
integrity="sha384-rZfj/ogBloos6wzLGpPkkOr/gpkBNLZ6b6yLy4o+ok+t/SAKlL5mvXLr0OXNi1Hp">
|
||||||
|
</script>
|
||||||
|
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validation.unobtrusive/3.2.9/jquery.validate.unobtrusive.min.js"
|
||||||
|
asp-fallback-src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"
|
||||||
|
asp-fallback-test="window.jQuery && window.jQuery.validator && window.jQuery.validator.unobtrusive"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
integrity="sha384-ifv0TYDWxBHzvAk2Z0n8R434FL1Rlv/Av18DXE43N/1rvHyOG4izKst0f2iSLdds">
|
||||||
|
</script>
|
||||||
|
</environment>
|
|
@ -0,0 +1,3 @@
|
||||||
|
@using Moshaverino.Core
|
||||||
|
@using Moshaverino.Core.Models
|
||||||
|
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
|
@ -0,0 +1,3 @@
|
||||||
|
@{
|
||||||
|
Layout = "_Layout";
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Microsoft": "Warning",
|
||||||
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"ConnectionStrings": {
|
||||||
|
"LocalConnection": "Server=.;Database=Moshaverino;Trusted_Connection=true;MultipleActiveResultSets=true",
|
||||||
|
"ServerConnection": "Data Source=localhost;Initial Catalog=konkuric_moshaverino;Integrated Security=False;User ID=konkuric_dbadmin;Password=Amdemon@1377;Connect Timeout=15;Encrypt=False;Packet Size=4096"
|
||||||
|
},
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Microsoft": "Warning",
|
||||||
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"AllowedHosts": "*"
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
"version": "1.0",
|
||||||
|
"defaultProvider": "cdnjs",
|
||||||
|
"libraries": [
|
||||||
|
{
|
||||||
|
"provider": "unpkg",
|
||||||
|
"library": "bootstrap@4.3.1",
|
||||||
|
"destination": "wwwroot/lib/bootstrap/",
|
||||||
|
"files": [
|
||||||
|
"dist/css/bootstrap-grid.css",
|
||||||
|
"dist/css/bootstrap-grid.css.map",
|
||||||
|
"dist/css/bootstrap-grid.min.css",
|
||||||
|
"dist/css/bootstrap-grid.min.css.map",
|
||||||
|
"dist/css/bootstrap-reboot.css",
|
||||||
|
"dist/css/bootstrap-reboot.css.map",
|
||||||
|
"dist/css/bootstrap-reboot.min.css",
|
||||||
|
"dist/css/bootstrap-reboot.min.css.map",
|
||||||
|
"dist/css/bootstrap.css",
|
||||||
|
"dist/css/bootstrap.css.map",
|
||||||
|
"dist/css/bootstrap.min.css",
|
||||||
|
"dist/css/bootstrap.min.css.map",
|
||||||
|
"dist/js/bootstrap.bundle.js",
|
||||||
|
"dist/js/bootstrap.bundle.js.map",
|
||||||
|
"dist/js/bootstrap.bundle.min.js",
|
||||||
|
"dist/js/bootstrap.bundle.min.js.map",
|
||||||
|
"dist/js/bootstrap.js",
|
||||||
|
"dist/js/bootstrap.js.map",
|
||||||
|
"dist/js/bootstrap.min.js",
|
||||||
|
"dist/js/bootstrap.min.js.map"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<location path="." inheritInChildApplications="false">
|
||||||
|
<system.webServer>
|
||||||
|
<handlers>
|
||||||
|
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
|
||||||
|
</handlers>
|
||||||
|
<aspNetCore processPath="C:\Users\avvam\source\repos\Moshaverino\Moshaverino.Core\bin\Debug\netcoreapp3.1\Moshaverino.Core.exe" arguments="" stdoutLogEnabled="false" hostingModel="InProcess">
|
||||||
|
<environmentVariables>
|
||||||
|
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
|
||||||
|
</environmentVariables>
|
||||||
|
</aspNetCore>
|
||||||
|
</system.webServer>
|
||||||
|
</location>
|
||||||
|
</configuration>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,331 @@
|
||||||
|
/*!
|
||||||
|
* Bootstrap Reboot v4.3.1 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2019 The Bootstrap Authors
|
||||||
|
* Copyright 2011-2019 Twitter, Inc.
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
|
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||||
|
*/
|
||||||
|
*,
|
||||||
|
*::before,
|
||||||
|
*::after {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
font-family: sans-serif;
|
||||||
|
line-height: 1.15;
|
||||||
|
-webkit-text-size-adjust: 100%;
|
||||||
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 1.5;
|
||||||
|
color: #212529;
|
||||||
|
text-align: left;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
[tabindex="-1"]:focus {
|
||||||
|
outline: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
box-sizing: content-box;
|
||||||
|
height: 0;
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
abbr[title],
|
||||||
|
abbr[data-original-title] {
|
||||||
|
text-decoration: underline;
|
||||||
|
-webkit-text-decoration: underline dotted;
|
||||||
|
text-decoration: underline dotted;
|
||||||
|
cursor: help;
|
||||||
|
border-bottom: 0;
|
||||||
|
-webkit-text-decoration-skip-ink: none;
|
||||||
|
text-decoration-skip-ink: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
address {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
font-style: normal;
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol,
|
||||||
|
ul,
|
||||||
|
dl {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol ol,
|
||||||
|
ul ul,
|
||||||
|
ol ul,
|
||||||
|
ul ol {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
dt {
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
dd {
|
||||||
|
margin-bottom: .5rem;
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
margin: 0 0 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
b,
|
||||||
|
strong {
|
||||||
|
font-weight: bolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
small {
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub,
|
||||||
|
sup {
|
||||||
|
position: relative;
|
||||||
|
font-size: 75%;
|
||||||
|
line-height: 0;
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub {
|
||||||
|
bottom: -.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
sup {
|
||||||
|
top: -.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #007bff;
|
||||||
|
text-decoration: none;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
color: #0056b3;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:not([href]):not([tabindex]) {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:not([href]):not([tabindex]):hover, a:not([href]):not([tabindex]):focus {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:not([href]):not([tabindex]):focus {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre,
|
||||||
|
code,
|
||||||
|
kbd,
|
||||||
|
samp {
|
||||||
|
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
figure {
|
||||||
|
margin: 0 0 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
vertical-align: middle;
|
||||||
|
border-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
overflow: hidden;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
caption {
|
||||||
|
padding-top: 0.75rem;
|
||||||
|
padding-bottom: 0.75rem;
|
||||||
|
color: #6c757d;
|
||||||
|
text-align: left;
|
||||||
|
caption-side: bottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
text-align: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:focus {
|
||||||
|
outline: 1px dotted;
|
||||||
|
outline: 5px auto -webkit-focus-ring-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
input,
|
||||||
|
button,
|
||||||
|
select,
|
||||||
|
optgroup,
|
||||||
|
textarea {
|
||||||
|
margin: 0;
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: inherit;
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
input {
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
select {
|
||||||
|
text-transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
select {
|
||||||
|
word-wrap: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
[type="button"],
|
||||||
|
[type="reset"],
|
||||||
|
[type="submit"] {
|
||||||
|
-webkit-appearance: button;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:not(:disabled),
|
||||||
|
[type="button"]:not(:disabled),
|
||||||
|
[type="reset"]:not(:disabled),
|
||||||
|
[type="submit"]:not(:disabled) {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
button::-moz-focus-inner,
|
||||||
|
[type="button"]::-moz-focus-inner,
|
||||||
|
[type="reset"]::-moz-focus-inner,
|
||||||
|
[type="submit"]::-moz-focus-inner {
|
||||||
|
padding: 0;
|
||||||
|
border-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="radio"],
|
||||||
|
input[type="checkbox"] {
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="date"],
|
||||||
|
input[type="time"],
|
||||||
|
input[type="datetime-local"],
|
||||||
|
input[type="month"] {
|
||||||
|
-webkit-appearance: listbox;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
overflow: auto;
|
||||||
|
resize: vertical;
|
||||||
|
}
|
||||||
|
|
||||||
|
fieldset {
|
||||||
|
min-width: 0;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
legend {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
padding: 0;
|
||||||
|
margin-bottom: .5rem;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
line-height: inherit;
|
||||||
|
color: inherit;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
progress {
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
[type="number"]::-webkit-inner-spin-button,
|
||||||
|
[type="number"]::-webkit-outer-spin-button {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
[type="search"] {
|
||||||
|
outline-offset: -2px;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
[type="search"]::-webkit-search-decoration {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-file-upload-button {
|
||||||
|
font: inherit;
|
||||||
|
-webkit-appearance: button;
|
||||||
|
}
|
||||||
|
|
||||||
|
output {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
summary {
|
||||||
|
display: list-item;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
template {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
[hidden] {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
/*# sourceMappingURL=bootstrap-reboot.css.map */
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,8 @@
|
||||||
|
/*!
|
||||||
|
* Bootstrap Reboot v4.3.1 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2019 The Bootstrap Authors
|
||||||
|
* Copyright 2011-2019 Twitter, Inc.
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
|
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||||
|
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
|
||||||
|
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"isRoot": true,
|
||||||
|
"tools": {
|
||||||
|
"dotnet-ef": {
|
||||||
|
"version": "3.1.2",
|
||||||
|
"commands": [
|
||||||
|
"dotnet-ef"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,158 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using Moshaverino.Web.Models;
|
||||||
|
|
||||||
|
namespace Moshaverino.Web.Controllers
|
||||||
|
{
|
||||||
|
public class HomeController : Controller
|
||||||
|
{
|
||||||
|
private readonly MoshaverinoContext _context;
|
||||||
|
private readonly SiteSettings _siteSettings;
|
||||||
|
|
||||||
|
public HomeController(MoshaverinoContext context , IOptionsSnapshot<SiteSettings> siteSettings)
|
||||||
|
{
|
||||||
|
_context = context;
|
||||||
|
_siteSettings = siteSettings.Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: Home
|
||||||
|
public async Task<IActionResult> Index()
|
||||||
|
{
|
||||||
|
if (_siteSettings.ShowPanel)
|
||||||
|
return View(await _context.Students.ToListAsync());
|
||||||
|
else
|
||||||
|
return Ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: Home/Details/5
|
||||||
|
public async Task<IActionResult> Details(int? id)
|
||||||
|
{
|
||||||
|
if (id == null)
|
||||||
|
{
|
||||||
|
return NotFound();
|
||||||
|
}
|
||||||
|
|
||||||
|
var student = await _context.Students
|
||||||
|
.FirstOrDefaultAsync(m => m.StudentId == id);
|
||||||
|
if (student == null)
|
||||||
|
{
|
||||||
|
return NotFound();
|
||||||
|
}
|
||||||
|
|
||||||
|
return View(student);
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: Home/Create
|
||||||
|
public IActionResult Create()
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: Home/Create
|
||||||
|
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||||
|
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||||
|
[HttpPost]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
|
public async Task<IActionResult> Create([Bind("StudentId,PhoneNumber,Code,HumenSex,FullName,StudyField,StudyGrade,AverageNumber,FavoriteLesson,UnFavoriteLesson,FavoriteExam,AverageTaraz,CreationTime,RemoveTime,IsRemoved")] Student student)
|
||||||
|
{
|
||||||
|
if (ModelState.IsValid)
|
||||||
|
{
|
||||||
|
_context.Add(student);
|
||||||
|
await _context.SaveChangesAsync();
|
||||||
|
return RedirectToAction(nameof(Index));
|
||||||
|
}
|
||||||
|
return View(student);
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: Home/Edit/5
|
||||||
|
public async Task<IActionResult> Edit(int? id)
|
||||||
|
{
|
||||||
|
if (id == null)
|
||||||
|
{
|
||||||
|
return NotFound();
|
||||||
|
}
|
||||||
|
|
||||||
|
var student = await _context.Students.FindAsync(id);
|
||||||
|
if (student == null)
|
||||||
|
{
|
||||||
|
return NotFound();
|
||||||
|
}
|
||||||
|
return View(student);
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: Home/Edit/5
|
||||||
|
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||||
|
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||||
|
[HttpPost]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
|
public async Task<IActionResult> Edit(int id, [Bind("StudentId,PhoneNumber,Code,HumenSex,FullName,StudyField,StudyGrade,AverageNumber,FavoriteLesson,UnFavoriteLesson,FavoriteExam,AverageTaraz,CreationTime,RemoveTime,IsRemoved")] Student student)
|
||||||
|
{
|
||||||
|
if (id != student.StudentId)
|
||||||
|
{
|
||||||
|
return NotFound();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ModelState.IsValid)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
_context.Update(student);
|
||||||
|
await _context.SaveChangesAsync();
|
||||||
|
}
|
||||||
|
catch (DbUpdateConcurrencyException)
|
||||||
|
{
|
||||||
|
if (!StudentExists(student.StudentId))
|
||||||
|
{
|
||||||
|
return NotFound();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return RedirectToAction(nameof(Index));
|
||||||
|
}
|
||||||
|
return View(student);
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: Home/Delete/5
|
||||||
|
public async Task<IActionResult> Delete(int? id)
|
||||||
|
{
|
||||||
|
if (id == null)
|
||||||
|
{
|
||||||
|
return NotFound();
|
||||||
|
}
|
||||||
|
|
||||||
|
var student = await _context.Students
|
||||||
|
.FirstOrDefaultAsync(m => m.StudentId == id);
|
||||||
|
if (student == null)
|
||||||
|
{
|
||||||
|
return NotFound();
|
||||||
|
}
|
||||||
|
|
||||||
|
return View(student);
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: Home/Delete/5
|
||||||
|
[HttpPost, ActionName("Delete")]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
|
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||||
|
{
|
||||||
|
var student = await _context.Students.FindAsync(id);
|
||||||
|
_context.Students.Remove(student);
|
||||||
|
await _context.SaveChangesAsync();
|
||||||
|
return RedirectToAction(nameof(Index));
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool StudentExists(int id)
|
||||||
|
{
|
||||||
|
return _context.Students.Any(e => e.StudentId == id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,114 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Kavenegar;
|
||||||
|
using Kavenegar.Core.Exceptions;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Moshaverino.Web.Models;
|
||||||
|
|
||||||
|
namespace Moshaverino.Web.Controllers
|
||||||
|
{
|
||||||
|
[Route("api/[controller]")]
|
||||||
|
[ApiController]
|
||||||
|
public class StudentController : ControllerBase
|
||||||
|
{
|
||||||
|
private readonly MoshaverinoContext _context;
|
||||||
|
public StudentController(MoshaverinoContext context)
|
||||||
|
{
|
||||||
|
_context = context;
|
||||||
|
}
|
||||||
|
[HttpPost("Code")]
|
||||||
|
public async Task<IActionResult> GetCode(string phoneNumber)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (IsStudentExist(phoneNumber))
|
||||||
|
{
|
||||||
|
var student = _context.Students.FirstOrDefault(u => u.PhoneNumber == phoneNumber);
|
||||||
|
SendSms(student.PhoneNumber, student.Code);
|
||||||
|
return Ok(student);
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var st = new Student
|
||||||
|
{
|
||||||
|
PhoneNumber = phoneNumber,
|
||||||
|
Code = GetRandomCode()
|
||||||
|
};
|
||||||
|
_context.Students.Add(st);
|
||||||
|
_context.SaveChanges();
|
||||||
|
SendSms(st.PhoneNumber, st.Code);
|
||||||
|
return Ok(st);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return BadRequest(e.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[HttpGet("Code")]
|
||||||
|
public async Task<IActionResult> CheckCode(string code)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return Ok(_context.Students.Any(s => s.Code == code));
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return BadRequest(e.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost("SetInfo")]
|
||||||
|
public async Task<IActionResult> SetStudentInfo(Student student)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
_context.Entry<Student>(student).State = EntityState.Modified;
|
||||||
|
_context.SaveChanges();
|
||||||
|
return Ok(student);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return BadRequest(e.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool IsStudentExist(string phoneNumber)
|
||||||
|
{
|
||||||
|
return _context.Students.Any(s => s.PhoneNumber == phoneNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task<bool> SendSms(string phoneNumber, string code)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var api = new KavenegarApi(
|
||||||
|
"32433666522B516838714779627679525877746E457337536A377663526A543265646650372F456F774F413D");
|
||||||
|
var result = await api.VerifyLookup(phoneNumber, code, "verifyPhone");
|
||||||
|
if (result.Status == 200)
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
catch (ApiException e)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetRandomCode()
|
||||||
|
{
|
||||||
|
Random random = new Random(DateTime.Now.Millisecond);
|
||||||
|
var code = random.Next(111111, 999999);
|
||||||
|
if (_context.Students.Any(s => s.Code == code.ToString()))
|
||||||
|
return GetRandomCode();
|
||||||
|
else
|
||||||
|
return code.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Moshaverino.Web.Models;
|
||||||
|
|
||||||
|
namespace Moshaverino.Web
|
||||||
|
{
|
||||||
|
public class DBInitializer
|
||||||
|
{
|
||||||
|
private readonly MoshaverinoContext _context;
|
||||||
|
public DBInitializer(MoshaverinoContext context)
|
||||||
|
{
|
||||||
|
_context = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Seed()
|
||||||
|
{
|
||||||
|
_context.Database.Migrate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,80 @@
|
||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using Moshaverino.Web.Models;
|
||||||
|
|
||||||
|
namespace Moshaverino.Web.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(MoshaverinoContext))]
|
||||||
|
[Migration("20200310125652_init")]
|
||||||
|
partial class init
|
||||||
|
{
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "3.1.2")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 128)
|
||||||
|
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||||
|
|
||||||
|
modelBuilder.Entity("Moshaverino.Web.Models.Student", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("StudentId")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||||
|
|
||||||
|
b.Property<string>("AverageNumber")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("AverageTaraz")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Code")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("FavoriteExam")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("FavoriteLesson")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("FullName")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("HumenSex")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<bool>("IsRemoved")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("PhoneNumber")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("RemoveTime")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("StudyField")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("StudyGrade")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("UnFavoriteLesson")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("StudentId");
|
||||||
|
|
||||||
|
b.ToTable("Students");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace Moshaverino.Web.Migrations
|
||||||
|
{
|
||||||
|
public partial class init : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Students",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
StudentId = table.Column<int>(nullable: false)
|
||||||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
|
CreationTime = table.Column<DateTime>(nullable: false),
|
||||||
|
RemoveTime = table.Column<DateTime>(nullable: false),
|
||||||
|
IsRemoved = table.Column<bool>(nullable: false),
|
||||||
|
PhoneNumber = table.Column<string>(nullable: true),
|
||||||
|
Code = table.Column<string>(nullable: true),
|
||||||
|
HumenSex = table.Column<int>(nullable: false),
|
||||||
|
FullName = table.Column<string>(nullable: true),
|
||||||
|
StudyField = table.Column<string>(nullable: true),
|
||||||
|
StudyGrade = table.Column<string>(nullable: true),
|
||||||
|
AverageNumber = table.Column<string>(nullable: true),
|
||||||
|
FavoriteLesson = table.Column<string>(nullable: true),
|
||||||
|
UnFavoriteLesson = table.Column<string>(nullable: true),
|
||||||
|
FavoriteExam = table.Column<string>(nullable: true),
|
||||||
|
AverageTaraz = table.Column<string>(nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Students", x => x.StudentId);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Students");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,78 @@
|
||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using Moshaverino.Web.Models;
|
||||||
|
|
||||||
|
namespace Moshaverino.Web.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(MoshaverinoContext))]
|
||||||
|
partial class MoshaverinoContextModelSnapshot : ModelSnapshot
|
||||||
|
{
|
||||||
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "3.1.2")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 128)
|
||||||
|
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||||
|
|
||||||
|
modelBuilder.Entity("Moshaverino.Web.Models.Student", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("StudentId")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||||
|
|
||||||
|
b.Property<string>("AverageNumber")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("AverageTaraz")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Code")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("FavoriteExam")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("FavoriteLesson")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("FullName")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("HumenSex")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<bool>("IsRemoved")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("PhoneNumber")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("RemoveTime")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("StudyField")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("StudyGrade")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("UnFavoriteLesson")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("StudentId");
|
||||||
|
|
||||||
|
b.ToTable("Students");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Moshaverino.Web.Models
|
||||||
|
{
|
||||||
|
public class Entity
|
||||||
|
{
|
||||||
|
public DateTime CreationTime { get; set; }
|
||||||
|
public DateTime RemoveTime { get; set; }
|
||||||
|
public bool IsRemoved { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Moshaverino.Web.Models
|
||||||
|
{
|
||||||
|
public class ErrorViewModel
|
||||||
|
{
|
||||||
|
public string RequestId { get; set; }
|
||||||
|
|
||||||
|
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
namespace Moshaverino.Web.Models
|
||||||
|
{
|
||||||
|
public class MoshaverinoContext : DbContext
|
||||||
|
{
|
||||||
|
public MoshaverinoContext(DbContextOptions<MoshaverinoContext> contextOptions) : base(contextOptions) { }
|
||||||
|
public DbSet<Student> Students { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Moshaverino.Web.Models
|
||||||
|
{
|
||||||
|
public class SiteSettings
|
||||||
|
{
|
||||||
|
public bool ShowPanel { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Moshaverino.Web.Models
|
||||||
|
{
|
||||||
|
public enum HumenSex
|
||||||
|
{
|
||||||
|
Male,
|
||||||
|
Female
|
||||||
|
}
|
||||||
|
public class Student : Entity
|
||||||
|
{
|
||||||
|
public int StudentId { get; set; }
|
||||||
|
public string PhoneNumber { get; set; }
|
||||||
|
public string Code { get; set; }
|
||||||
|
public HumenSex HumenSex { get; set; }
|
||||||
|
public string FullName { get; set; }
|
||||||
|
public string StudyField { get; set; }
|
||||||
|
public string StudyGrade { get; set; }
|
||||||
|
public string AverageNumber { get; set; }
|
||||||
|
public string FavoriteLesson { get; set; }
|
||||||
|
public string UnFavoriteLesson { get; set; }
|
||||||
|
public string FavoriteExam { get; set; }
|
||||||
|
public string AverageTaraz { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Kavenegar.Core" Version="1.0.1-alpha3" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.2" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.2">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.1" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.2" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.2">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.1" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="Properties\PublishProfiles\" />
|
||||||
|
<Folder Include="Views\Home\" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</Project>
|
|
@ -0,0 +1,32 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
namespace Moshaverino.Web
|
||||||
|
{
|
||||||
|
public class Program
|
||||||
|
{
|
||||||
|
public static void Main(string[] args)
|
||||||
|
{
|
||||||
|
var host = CreateHostBuilder(args).Build();
|
||||||
|
/*using (var _scop = host.Services.CreateScope())
|
||||||
|
{
|
||||||
|
_scop.ServiceProvider.GetService<DBInitializer>().Seed();
|
||||||
|
}*/
|
||||||
|
host.Run();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
||||||
|
Host.CreateDefaultBuilder(args)
|
||||||
|
.ConfigureWebHostDefaults(webBuilder =>
|
||||||
|
{
|
||||||
|
webBuilder.UseStartup<Startup>();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"iisSettings": {
|
||||||
|
"windowsAuthentication": false,
|
||||||
|
"anonymousAuthentication": true,
|
||||||
|
"iisExpress": {
|
||||||
|
"applicationUrl": "http://localhost:64397",
|
||||||
|
"sslPort": 44346
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"profiles": {
|
||||||
|
"IIS Express": {
|
||||||
|
"commandName": "IISExpress",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Moshaverino.Web": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"applicationUrl": "https://localhost:5001;http://localhost:5000",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,67 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.AspNetCore.HttpsPolicy;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
|
using Moshaverino.Web.Models;
|
||||||
|
|
||||||
|
namespace Moshaverino.Web
|
||||||
|
{
|
||||||
|
public class Startup
|
||||||
|
{
|
||||||
|
|
||||||
|
public Startup(IConfiguration configuration)
|
||||||
|
{
|
||||||
|
Configuration = configuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IConfiguration Configuration { get; }
|
||||||
|
|
||||||
|
// This method gets called by the runtime. Use this method to add services to the container.
|
||||||
|
public void ConfigureServices(IServiceCollection services)
|
||||||
|
{
|
||||||
|
services.Configure<SiteSettings>(Configuration.GetSection(nameof(SiteSettings)));
|
||||||
|
services.AddControllersWithViews();
|
||||||
|
services.AddDbContext<MoshaverinoContext>(options =>
|
||||||
|
{
|
||||||
|
//options.UseSqlServer(Configuration.GetConnectionString("LocalConnection"));
|
||||||
|
options.UseSqlServer("Data Source=localhost;Initial Catalog=konkuric_moshavertnodb;Integrated Security=False;User ID=konkuric_moadmin;Password=Amdemon@1377;Connect Timeout=15;Encrypt=False;Packet Size=4096");
|
||||||
|
});
|
||||||
|
services.AddScoped<DBInitializer>();
|
||||||
|
}
|
||||||
|
|
||||||
|
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||||
|
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||||
|
{
|
||||||
|
if (env.IsDevelopment())
|
||||||
|
{
|
||||||
|
app.UseDeveloperExceptionPage();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
app.UseExceptionHandler("/Home/Error");
|
||||||
|
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
||||||
|
app.UseHsts();
|
||||||
|
}
|
||||||
|
app.UseHttpsRedirection();
|
||||||
|
app.UseStaticFiles();
|
||||||
|
|
||||||
|
app.UseRouting();
|
||||||
|
|
||||||
|
app.UseAuthorization();
|
||||||
|
|
||||||
|
app.UseEndpoints(endpoints =>
|
||||||
|
{
|
||||||
|
endpoints.MapControllerRoute(
|
||||||
|
name: "default",
|
||||||
|
pattern: "{controller=Home}/{action=Index}/{id?}");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,98 @@
|
||||||
|
@model Moshaverino.Web.Models.Student
|
||||||
|
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "Create";
|
||||||
|
}
|
||||||
|
|
||||||
|
<h1>Create</h1>
|
||||||
|
|
||||||
|
<h4>Student</h4>
|
||||||
|
<hr />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<form asp-action="Create">
|
||||||
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="PhoneNumber" class="control-label"></label>
|
||||||
|
<input asp-for="PhoneNumber" class="form-control" />
|
||||||
|
<span asp-validation-for="PhoneNumber" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="Code" class="control-label"></label>
|
||||||
|
<input asp-for="Code" class="form-control" />
|
||||||
|
<span asp-validation-for="Code" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="HumenSex" class="control-label"></label>
|
||||||
|
<select asp-for="HumenSex" class="form-control"></select>
|
||||||
|
<span asp-validation-for="HumenSex" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="FullName" class="control-label"></label>
|
||||||
|
<input asp-for="FullName" class="form-control" />
|
||||||
|
<span asp-validation-for="FullName" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="StudyField" class="control-label"></label>
|
||||||
|
<input asp-for="StudyField" class="form-control" />
|
||||||
|
<span asp-validation-for="StudyField" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="StudyGrade" class="control-label"></label>
|
||||||
|
<input asp-for="StudyGrade" class="form-control" />
|
||||||
|
<span asp-validation-for="StudyGrade" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="AverageNumber" class="control-label"></label>
|
||||||
|
<input asp-for="AverageNumber" class="form-control" />
|
||||||
|
<span asp-validation-for="AverageNumber" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="FavoriteLesson" class="control-label"></label>
|
||||||
|
<input asp-for="FavoriteLesson" class="form-control" />
|
||||||
|
<span asp-validation-for="FavoriteLesson" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="UnFavoriteLesson" class="control-label"></label>
|
||||||
|
<input asp-for="UnFavoriteLesson" class="form-control" />
|
||||||
|
<span asp-validation-for="UnFavoriteLesson" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="FavoriteExam" class="control-label"></label>
|
||||||
|
<input asp-for="FavoriteExam" class="form-control" />
|
||||||
|
<span asp-validation-for="FavoriteExam" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="AverageTaraz" class="control-label"></label>
|
||||||
|
<input asp-for="AverageTaraz" class="form-control" />
|
||||||
|
<span asp-validation-for="AverageTaraz" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="CreationTime" class="control-label"></label>
|
||||||
|
<input asp-for="CreationTime" class="form-control" />
|
||||||
|
<span asp-validation-for="CreationTime" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="RemoveTime" class="control-label"></label>
|
||||||
|
<input asp-for="RemoveTime" class="form-control" />
|
||||||
|
<span asp-validation-for="RemoveTime" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-check">
|
||||||
|
<label class="form-check-label">
|
||||||
|
<input class="form-check-input" asp-for="IsRemoved" /> @Html.DisplayNameFor(model => model.IsRemoved)
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="submit" value="Create" class="btn btn-primary" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<a asp-action="Index">Back to List</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@section Scripts {
|
||||||
|
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
|
||||||
|
}
|
|
@ -0,0 +1,105 @@
|
||||||
|
@model Moshaverino.Web.Models.Student
|
||||||
|
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "Delete";
|
||||||
|
}
|
||||||
|
|
||||||
|
<h1>Delete</h1>
|
||||||
|
|
||||||
|
<h3>Are you sure you want to delete this?</h3>
|
||||||
|
<div>
|
||||||
|
<h4>Student</h4>
|
||||||
|
<hr />
|
||||||
|
<dl class="row">
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.PhoneNumber)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.PhoneNumber)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.Code)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.Code)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.HumenSex)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.HumenSex)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.FullName)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.FullName)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.StudyField)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.StudyField)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.StudyGrade)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.StudyGrade)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.AverageNumber)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.AverageNumber)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.FavoriteLesson)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.FavoriteLesson)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.UnFavoriteLesson)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.UnFavoriteLesson)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.FavoriteExam)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.FavoriteExam)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.AverageTaraz)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.AverageTaraz)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.CreationTime)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.CreationTime)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.RemoveTime)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.RemoveTime)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.IsRemoved)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.IsRemoved)
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
<form asp-action="Delete">
|
||||||
|
<input type="hidden" asp-for="StudentId" />
|
||||||
|
<input type="submit" value="Delete" class="btn btn-danger" /> |
|
||||||
|
<a asp-action="Index">Back to List</a>
|
||||||
|
</form>
|
||||||
|
</div>
|
|
@ -0,0 +1,102 @@
|
||||||
|
@model Moshaverino.Web.Models.Student
|
||||||
|
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "Details";
|
||||||
|
}
|
||||||
|
|
||||||
|
<h1>Details</h1>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h4>Student</h4>
|
||||||
|
<hr />
|
||||||
|
<dl class="row">
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.PhoneNumber)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.PhoneNumber)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.Code)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.Code)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.HumenSex)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.HumenSex)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.FullName)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.FullName)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.StudyField)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.StudyField)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.StudyGrade)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.StudyGrade)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.AverageNumber)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.AverageNumber)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.FavoriteLesson)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.FavoriteLesson)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.UnFavoriteLesson)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.UnFavoriteLesson)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.FavoriteExam)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.FavoriteExam)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.AverageTaraz)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.AverageTaraz)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.CreationTime)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.CreationTime)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.RemoveTime)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.RemoveTime)
|
||||||
|
</dd>
|
||||||
|
<dt class = "col-sm-2">
|
||||||
|
@Html.DisplayNameFor(model => model.IsRemoved)
|
||||||
|
</dt>
|
||||||
|
<dd class = "col-sm-10">
|
||||||
|
@Html.DisplayFor(model => model.IsRemoved)
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a asp-action="Edit" asp-route-id="@Model.StudentId">Edit</a> |
|
||||||
|
<a asp-action="Index">Back to List</a>
|
||||||
|
</div>
|
|
@ -0,0 +1,99 @@
|
||||||
|
@model Moshaverino.Web.Models.Student
|
||||||
|
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "Edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
<h1>Edit</h1>
|
||||||
|
|
||||||
|
<h4>Student</h4>
|
||||||
|
<hr />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<form asp-action="Edit">
|
||||||
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||||
|
<input type="hidden" asp-for="StudentId" />
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="PhoneNumber" class="control-label"></label>
|
||||||
|
<input asp-for="PhoneNumber" class="form-control" />
|
||||||
|
<span asp-validation-for="PhoneNumber" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="Code" class="control-label"></label>
|
||||||
|
<input asp-for="Code" class="form-control" />
|
||||||
|
<span asp-validation-for="Code" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="HumenSex" class="control-label"></label>
|
||||||
|
<select asp-for="HumenSex" class="form-control"></select>
|
||||||
|
<span asp-validation-for="HumenSex" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="FullName" class="control-label"></label>
|
||||||
|
<input asp-for="FullName" class="form-control" />
|
||||||
|
<span asp-validation-for="FullName" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="StudyField" class="control-label"></label>
|
||||||
|
<input asp-for="StudyField" class="form-control" />
|
||||||
|
<span asp-validation-for="StudyField" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="StudyGrade" class="control-label"></label>
|
||||||
|
<input asp-for="StudyGrade" class="form-control" />
|
||||||
|
<span asp-validation-for="StudyGrade" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="AverageNumber" class="control-label"></label>
|
||||||
|
<input asp-for="AverageNumber" class="form-control" />
|
||||||
|
<span asp-validation-for="AverageNumber" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="FavoriteLesson" class="control-label"></label>
|
||||||
|
<input asp-for="FavoriteLesson" class="form-control" />
|
||||||
|
<span asp-validation-for="FavoriteLesson" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="UnFavoriteLesson" class="control-label"></label>
|
||||||
|
<input asp-for="UnFavoriteLesson" class="form-control" />
|
||||||
|
<span asp-validation-for="UnFavoriteLesson" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="FavoriteExam" class="control-label"></label>
|
||||||
|
<input asp-for="FavoriteExam" class="form-control" />
|
||||||
|
<span asp-validation-for="FavoriteExam" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="AverageTaraz" class="control-label"></label>
|
||||||
|
<input asp-for="AverageTaraz" class="form-control" />
|
||||||
|
<span asp-validation-for="AverageTaraz" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="CreationTime" class="control-label"></label>
|
||||||
|
<input asp-for="CreationTime" class="form-control" />
|
||||||
|
<span asp-validation-for="CreationTime" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="RemoveTime" class="control-label"></label>
|
||||||
|
<input asp-for="RemoveTime" class="form-control" />
|
||||||
|
<span asp-validation-for="RemoveTime" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-check">
|
||||||
|
<label class="form-check-label">
|
||||||
|
<input class="form-check-input" asp-for="IsRemoved" /> @Html.DisplayNameFor(model => model.IsRemoved)
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="submit" value="Save" class="btn btn-primary" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<a asp-action="Index">Back to List</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@section Scripts {
|
||||||
|
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
|
||||||
|
}
|
|
@ -0,0 +1,115 @@
|
||||||
|
@model IEnumerable<Moshaverino.Web.Models.Student>
|
||||||
|
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "Index";
|
||||||
|
}
|
||||||
|
|
||||||
|
<h1>Index</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<a asp-action="Create">Create New</a>
|
||||||
|
</p>
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.PhoneNumber)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.Code)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.HumenSex)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.FullName)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.StudyField)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.StudyGrade)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.AverageNumber)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.FavoriteLesson)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.UnFavoriteLesson)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.FavoriteExam)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.AverageTaraz)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.CreationTime)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.RemoveTime)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.IsRemoved)
|
||||||
|
</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach (var item in Model)
|
||||||
|
{
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.PhoneNumber)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.Code)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.HumenSex)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.FullName)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.StudyField)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.StudyGrade)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.AverageNumber)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.FavoriteLesson)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.UnFavoriteLesson)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.FavoriteExam)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.AverageTaraz)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.CreationTime)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.RemoveTime)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.IsRemoved)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a asp-action="Edit" asp-route-id="@item.StudentId">Edit</a> |
|
||||||
|
<a asp-action="Details" asp-route-id="@item.StudentId">Details</a> |
|
||||||
|
<a asp-action="Delete" asp-route-id="@item.StudentId">Delete</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
|
@ -0,0 +1,25 @@
|
||||||
|
@model ErrorViewModel
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "Error";
|
||||||
|
}
|
||||||
|
|
||||||
|
<h1 class="text-danger">Error.</h1>
|
||||||
|
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||||
|
|
||||||
|
@if (Model.ShowRequestId)
|
||||||
|
{
|
||||||
|
<p>
|
||||||
|
<strong>Request ID:</strong> <code>@Model.RequestId</code>
|
||||||
|
</p>
|
||||||
|
}
|
||||||
|
|
||||||
|
<h3>Development Mode</h3>
|
||||||
|
<p>
|
||||||
|
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
|
||||||
|
It can result in displaying sensitive information from exceptions to end users.
|
||||||
|
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
|
||||||
|
and restarting the app.
|
||||||
|
</p>
|
|
@ -0,0 +1,45 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>@ViewData["Title"] - Moshaverino.Web</title>
|
||||||
|
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
|
||||||
|
<link rel="stylesheet" href="~/css/site.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Moshaverino Panel</a>
|
||||||
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent"
|
||||||
|
aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
<div class="navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse">
|
||||||
|
<ul class="navbar-nav flex-grow-1">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
<div class="container-fluid">
|
||||||
|
<main role="main">
|
||||||
|
@RenderBody()
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer class="border-top footer text-muted">
|
||||||
|
<div class="container">
|
||||||
|
© 2020 - Moshaverino.Web - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||||||
|
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
<script src="~/js/site.js" asp-append-version="true"></script>
|
||||||
|
@RenderSection("Scripts", required: false)
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,2 @@
|
||||||
|
<script src="~/lib/jquery-validation/dist/jquery.validate.min.js"></script>
|
||||||
|
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script>
|
|
@ -0,0 +1,3 @@
|
||||||
|
@using Moshaverino.Web
|
||||||
|
@using Moshaverino.Web.Models
|
||||||
|
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
|
@ -0,0 +1,3 @@
|
||||||
|
@{
|
||||||
|
Layout = "_Layout";
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Microsoft": "Warning",
|
||||||
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"ConnectionStrings": {
|
||||||
|
"LocalConnection": "Server=.;Database=Moshaverino;Trusted_Connection=true;MultipleActiveResultSets=true",
|
||||||
|
"ServerConnection": "Data Source=localhost;Initial Catalog=konkuric_moshaverino;Integrated Security=False;User ID=konkuric_dbadmin;Password=Amdemon@1377;Connect Timeout=15;Encrypt=False;Packet Size=4096"
|
||||||
|
},
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Microsoft": "Warning",
|
||||||
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"SiteSettings": {
|
||||||
|
"ShowPanel": true
|
||||||
|
} ,
|
||||||
|
"AllowedHosts": "*"
|
||||||
|
}
|
|
@ -0,0 +1,71 @@
|
||||||
|
/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
|
||||||
|
for details on configuring this project to bundle and minify static web assets. */
|
||||||
|
|
||||||
|
a.navbar-brand {
|
||||||
|
white-space: normal;
|
||||||
|
text-align: center;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provide sufficient contrast against white background */
|
||||||
|
a {
|
||||||
|
color: #0366d6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #1b6ec2;
|
||||||
|
border-color: #1861ac;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #1b6ec2;
|
||||||
|
border-color: #1861ac;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Sticky footer styles
|
||||||
|
-------------------------------------------------- */
|
||||||
|
html {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
html {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.border-top {
|
||||||
|
border-top: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
.border-bottom {
|
||||||
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-shadow {
|
||||||
|
box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
|
||||||
|
}
|
||||||
|
|
||||||
|
button.accept-policy {
|
||||||
|
font-size: 1rem;
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Sticky footer styles
|
||||||
|
-------------------------------------------------- */
|
||||||
|
html {
|
||||||
|
position: relative;
|
||||||
|
min-height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
/* Margin bottom by footer height */
|
||||||
|
margin-bottom: 60px;
|
||||||
|
}
|
||||||
|
.footer {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
white-space: nowrap;
|
||||||
|
line-height: 60px; /* Vertically center the text there */
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
|
@ -0,0 +1,4 @@
|
||||||
|
// Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
|
||||||
|
// for details on configuring this project to bundle and minify static web assets.
|
||||||
|
|
||||||
|
// Write your JavaScript code.
|
|
@ -0,0 +1,22 @@
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2011-2018 Twitter, Inc.
|
||||||
|
Copyright (c) 2011-2018 The Bootstrap Authors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,331 @@
|
||||||
|
/*!
|
||||||
|
* Bootstrap Reboot v4.3.1 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2019 The Bootstrap Authors
|
||||||
|
* Copyright 2011-2019 Twitter, Inc.
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
|
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||||
|
*/
|
||||||
|
*,
|
||||||
|
*::before,
|
||||||
|
*::after {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
font-family: sans-serif;
|
||||||
|
line-height: 1.15;
|
||||||
|
-webkit-text-size-adjust: 100%;
|
||||||
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 1.5;
|
||||||
|
color: #212529;
|
||||||
|
text-align: left;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
[tabindex="-1"]:focus {
|
||||||
|
outline: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
box-sizing: content-box;
|
||||||
|
height: 0;
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
abbr[title],
|
||||||
|
abbr[data-original-title] {
|
||||||
|
text-decoration: underline;
|
||||||
|
-webkit-text-decoration: underline dotted;
|
||||||
|
text-decoration: underline dotted;
|
||||||
|
cursor: help;
|
||||||
|
border-bottom: 0;
|
||||||
|
-webkit-text-decoration-skip-ink: none;
|
||||||
|
text-decoration-skip-ink: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
address {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
font-style: normal;
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol,
|
||||||
|
ul,
|
||||||
|
dl {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol ol,
|
||||||
|
ul ul,
|
||||||
|
ol ul,
|
||||||
|
ul ol {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
dt {
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
dd {
|
||||||
|
margin-bottom: .5rem;
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
margin: 0 0 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
b,
|
||||||
|
strong {
|
||||||
|
font-weight: bolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
small {
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub,
|
||||||
|
sup {
|
||||||
|
position: relative;
|
||||||
|
font-size: 75%;
|
||||||
|
line-height: 0;
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub {
|
||||||
|
bottom: -.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
sup {
|
||||||
|
top: -.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #007bff;
|
||||||
|
text-decoration: none;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
color: #0056b3;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:not([href]):not([tabindex]) {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:not([href]):not([tabindex]):hover, a:not([href]):not([tabindex]):focus {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:not([href]):not([tabindex]):focus {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre,
|
||||||
|
code,
|
||||||
|
kbd,
|
||||||
|
samp {
|
||||||
|
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
figure {
|
||||||
|
margin: 0 0 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
vertical-align: middle;
|
||||||
|
border-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
overflow: hidden;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
caption {
|
||||||
|
padding-top: 0.75rem;
|
||||||
|
padding-bottom: 0.75rem;
|
||||||
|
color: #6c757d;
|
||||||
|
text-align: left;
|
||||||
|
caption-side: bottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
text-align: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:focus {
|
||||||
|
outline: 1px dotted;
|
||||||
|
outline: 5px auto -webkit-focus-ring-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
input,
|
||||||
|
button,
|
||||||
|
select,
|
||||||
|
optgroup,
|
||||||
|
textarea {
|
||||||
|
margin: 0;
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: inherit;
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
input {
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
select {
|
||||||
|
text-transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
select {
|
||||||
|
word-wrap: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
[type="button"],
|
||||||
|
[type="reset"],
|
||||||
|
[type="submit"] {
|
||||||
|
-webkit-appearance: button;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:not(:disabled),
|
||||||
|
[type="button"]:not(:disabled),
|
||||||
|
[type="reset"]:not(:disabled),
|
||||||
|
[type="submit"]:not(:disabled) {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
button::-moz-focus-inner,
|
||||||
|
[type="button"]::-moz-focus-inner,
|
||||||
|
[type="reset"]::-moz-focus-inner,
|
||||||
|
[type="submit"]::-moz-focus-inner {
|
||||||
|
padding: 0;
|
||||||
|
border-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="radio"],
|
||||||
|
input[type="checkbox"] {
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="date"],
|
||||||
|
input[type="time"],
|
||||||
|
input[type="datetime-local"],
|
||||||
|
input[type="month"] {
|
||||||
|
-webkit-appearance: listbox;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
overflow: auto;
|
||||||
|
resize: vertical;
|
||||||
|
}
|
||||||
|
|
||||||
|
fieldset {
|
||||||
|
min-width: 0;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
legend {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
padding: 0;
|
||||||
|
margin-bottom: .5rem;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
line-height: inherit;
|
||||||
|
color: inherit;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
progress {
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
[type="number"]::-webkit-inner-spin-button,
|
||||||
|
[type="number"]::-webkit-outer-spin-button {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
[type="search"] {
|
||||||
|
outline-offset: -2px;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
[type="search"]::-webkit-search-decoration {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-file-upload-button {
|
||||||
|
font: inherit;
|
||||||
|
-webkit-appearance: button;
|
||||||
|
}
|
||||||
|
|
||||||
|
output {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
summary {
|
||||||
|
display: list-item;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
template {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
[hidden] {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
/*# sourceMappingURL=bootstrap-reboot.css.map */
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,8 @@
|
||||||
|
/*!
|
||||||
|
* Bootstrap Reboot v4.3.1 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2019 The Bootstrap Authors
|
||||||
|
* Copyright 2011-2019 Twitter, Inc.
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
|
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||||
|
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
|
||||||
|
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,12 @@
|
||||||
|
Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||||
|
these files except in compliance with the License. You may obtain a copy of the
|
||||||
|
License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software distributed
|
||||||
|
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||||
|
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations under the License.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue