ну типа работает! но не всё
This commit is contained in:
parent
386b8f0bd9
commit
f6b5c6f069
@ -11,9 +11,9 @@ namespace LawFirmDatabaseImplement
|
||||
{
|
||||
if (optionsBuilder.IsConfigured == false)
|
||||
{
|
||||
//optionsBuilder.UseSqlServer(@"Data Source=ZIRAEL\SQLEXPRESS;Initial Catalog=LawFirmDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||
optionsBuilder.UseSqlServer(@"Data Source=ZIRAEL\SQLEXPRESS;Initial Catalog=LawFirmDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||
|
||||
optionsBuilder.UseSqlServer(@"Data Source=PC-Anna\SQLEXPRESS;Initial Catalog=LawFirmDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||
//optionsBuilder.UseSqlServer(@"Data Source=PC-Anna\SQLEXPRESS;Initial Catalog=LawFirmDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||
}
|
||||
base.OnConfiguring(optionsBuilder);
|
||||
}
|
||||
|
@ -7,17 +7,17 @@ namespace LawFirmExecutorApp
|
||||
{
|
||||
public class APIClient
|
||||
{
|
||||
private static readonly HttpClient _client = new();
|
||||
public static ExecutorViewModel? User { get; set; } = null;
|
||||
private static readonly HttpClient _executor = new();
|
||||
public static ExecutorViewModel? Executor { get; set; } = null;
|
||||
public static void Connect(IConfiguration configuration)
|
||||
{
|
||||
_client.BaseAddress = new Uri(configuration["IPAddress"]);
|
||||
_client.DefaultRequestHeaders.Accept.Clear();
|
||||
_client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
|
||||
_executor.BaseAddress = new Uri(configuration["IPAddress"]);
|
||||
_executor.DefaultRequestHeaders.Accept.Clear();
|
||||
_executor.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
|
||||
}
|
||||
public static T? GetRequest<T>(string requestUrl)
|
||||
{
|
||||
var response = _client.GetAsync(requestUrl);
|
||||
var response = _executor.GetAsync(requestUrl);
|
||||
var result = response.Result.Content.ReadAsStringAsync().Result;
|
||||
if (response.Result.IsSuccessStatusCode)
|
||||
{
|
||||
@ -32,7 +32,7 @@ namespace LawFirmExecutorApp
|
||||
{
|
||||
var json = JsonConvert.SerializeObject(model);
|
||||
var data = new StringContent(json, Encoding.UTF8, "application/json");
|
||||
var response = _client.PostAsync(requestUrl, data);
|
||||
var response = _executor.PostAsync(requestUrl, data);
|
||||
var result = response.Result.Content.ReadAsStringAsync().Result;
|
||||
if (!response.Result.IsSuccessStatusCode)
|
||||
{
|
||||
|
@ -8,27 +8,38 @@ namespace LawFirmExecutorApp.Controllers
|
||||
{
|
||||
public class CaseController : Controller
|
||||
{
|
||||
[HttpGet]
|
||||
public IActionResult CaseClients(int id)
|
||||
{
|
||||
if (APIClient.Executor == null)
|
||||
{
|
||||
return Redirect("~/Home/EnterExecutor");
|
||||
}
|
||||
return
|
||||
View(APIClient.GetRequest<List<ClientViewModel>>($"api/case/getclientlisttocase?conId={id}"));
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult AddClient()
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
if (APIClient.Executor == null)
|
||||
{
|
||||
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
||||
}
|
||||
//ViewBag.Cases = APIClient.GetRequest<List<CaseViewModel>>($"api/case/getcaselist?companyId={APIClient.User.CompanyId}");
|
||||
//ViewBag.Clients = APIClient.GetRequest<List<ClientViewModel>>($"api/client/getclientlist?companyId={APIClient.User.CompanyId}");
|
||||
ViewBag.Cases = APIClient.GetRequest<List<CaseViewModel>>($"api/case/getcaselist?executorId={APIClient.Executor.Id}");
|
||||
ViewBag.Clients = APIClient.GetRequest<List<ClientViewModel>>($"api/client/getclientlist?executorId={APIClient.Executor.Id}");
|
||||
return View();
|
||||
}
|
||||
[HttpPost]
|
||||
public void AddClient(int id, int clientId)
|
||||
public void AddClient(int conId, int clientId)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
if (APIClient.Executor == null)
|
||||
{
|
||||
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
||||
}
|
||||
|
||||
APIClient.PostRequest("api/case/addclienttocase", Tuple.Create(new CaseSearchModel { Id = id }, new ClientViewModel { Id = clientId }));
|
||||
Response.Redirect("/Home/Cases");
|
||||
APIClient.PostRequest("api/case/addclienttocase", Tuple.Create(new CaseSearchModel { Id = conId }, clientId));
|
||||
Response.Redirect("Home/Cases");
|
||||
}
|
||||
[HttpGet]
|
||||
public IActionResult CreateCase()
|
||||
@ -36,9 +47,9 @@ namespace LawFirmExecutorApp.Controllers
|
||||
return View();
|
||||
}
|
||||
[HttpPost]
|
||||
public void CreateCase(string name)
|
||||
public void CreateCase(string name, string type, CaseStatus status, DateTime date)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
if (APIClient.Executor == null)
|
||||
{
|
||||
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
||||
}
|
||||
@ -46,27 +57,13 @@ namespace LawFirmExecutorApp.Controllers
|
||||
APIClient.PostRequest("api/case/createcase", new
|
||||
CaseBindingModel
|
||||
{
|
||||
ExecutorId = APIClient.Executor.Id,
|
||||
Name = name,
|
||||
DateCreate = DateTime.Now,
|
||||
Status = status,
|
||||
CaseType = type,
|
||||
DateCreate = date
|
||||
});
|
||||
Response.Redirect("/Home/Cases");
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public void DeleteCase(int id)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
{
|
||||
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
||||
}
|
||||
|
||||
APIClient.PostRequest("api/case/deletecase", new
|
||||
CaseSearchModel
|
||||
{
|
||||
Name = "name",
|
||||
Id = id
|
||||
});
|
||||
Response.Redirect("/Home/Cases");
|
||||
Response.Redirect("Home/Cases");
|
||||
}
|
||||
[HttpGet]
|
||||
public IActionResult UpdateCase()
|
||||
@ -74,9 +71,9 @@ namespace LawFirmExecutorApp.Controllers
|
||||
return View();
|
||||
}
|
||||
[HttpPost]
|
||||
public void UpdateCase(int id, string name, int statusId)
|
||||
public void UpdateCase(int id, string name, string type, CaseStatus status, DateTime date)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
if (APIClient.Executor == null)
|
||||
{
|
||||
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
||||
}
|
||||
@ -84,21 +81,33 @@ namespace LawFirmExecutorApp.Controllers
|
||||
APIClient.PostRequest("api/case/updatecase", new
|
||||
CaseBindingModel
|
||||
{
|
||||
Id = id,
|
||||
ExecutorId = APIClient.Executor.Id,
|
||||
Name = name,
|
||||
Status = (CaseStatus)statusId
|
||||
Status = status,
|
||||
CaseType = type,
|
||||
DateCreate = date
|
||||
});
|
||||
Response.Redirect("/Home/Cases");
|
||||
Response.Redirect("Home/Cases");
|
||||
}
|
||||
[HttpGet]
|
||||
public IActionResult CaseClients(int id)
|
||||
[HttpPost]
|
||||
public void DeleteCase(int id)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
if (APIClient.Executor == null)
|
||||
{
|
||||
return Redirect("/Home/EnterLawyer");
|
||||
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
||||
}
|
||||
return
|
||||
View(APIClient.GetRequest<List<ClientViewModel>>($"api/case/getclientlisttocase?caseId={id}"));
|
||||
|
||||
APIClient.PostRequest("api/case/deletecase", new
|
||||
CaseBindingModel
|
||||
{
|
||||
ExecutorId = APIClient.Executor.Id,
|
||||
Name = "",
|
||||
Status = 0,
|
||||
CaseType = "",
|
||||
DateCreate = DateTime.Now
|
||||
|
||||
});
|
||||
Response.Redirect("Home/Cases");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
using LawFirmContracts.BindingModels;
|
||||
using LawFirmContracts.SearchModels;
|
||||
using LawFirmContracts.ViewModels;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace LawFirmExecutorApp.Controllers
|
||||
@ -14,7 +15,7 @@ namespace LawFirmExecutorApp.Controllers
|
||||
[HttpPost]
|
||||
public void CreateClient(string fio, string phone, string email)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
if (APIClient.Executor == null)
|
||||
{
|
||||
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
||||
}
|
||||
@ -22,40 +23,42 @@ namespace LawFirmExecutorApp.Controllers
|
||||
APIClient.PostRequest("api/client/createclient", new
|
||||
ClientBindingModel
|
||||
{
|
||||
|
||||
ExecutorId = APIClient.Executor.Id,
|
||||
FIO = fio,
|
||||
Phone = phone,
|
||||
Email = email
|
||||
|
||||
});
|
||||
Response.Redirect("~/Client/Clients");
|
||||
Response.Redirect("Home/Clients");
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public void DeleteClient(int id)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
if (APIClient.Executor == null)
|
||||
{
|
||||
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
||||
}
|
||||
|
||||
APIClient.PostRequest("api/client/deleteclient", new
|
||||
ClientSearchModel
|
||||
ClientBindingModel
|
||||
{
|
||||
Email = "g",
|
||||
Phone = "g",
|
||||
FIO = "g",
|
||||
Id = id
|
||||
|
||||
});
|
||||
Response.Redirect("/Home/Clients");
|
||||
Response.Redirect("Home/Clients");
|
||||
}
|
||||
[HttpGet]
|
||||
public IActionResult UpdateClient()
|
||||
{
|
||||
ViewBag.Clients = APIClient.GetRequest<List<ClientViewModel>>($"api/client/getclientlist?guarantorid={APIClient.Executor.Id}");
|
||||
return View();
|
||||
}
|
||||
[HttpPost]
|
||||
public void UpdateClient(int id, string fio, string email, string phone)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
if (APIClient.Executor == null)
|
||||
{
|
||||
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
||||
}
|
||||
@ -63,12 +66,12 @@ namespace LawFirmExecutorApp.Controllers
|
||||
APIClient.PostRequest("api/client/updateclient", new
|
||||
ClientBindingModel
|
||||
{
|
||||
Id = id,
|
||||
ExecutorId = APIClient.Executor.Id,
|
||||
FIO = fio,
|
||||
Email = email,
|
||||
Phone = phone
|
||||
});
|
||||
Response.Redirect("/Home/Clients");
|
||||
Response.Redirect("Home/Clients");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,62 +16,52 @@ namespace LawFirmExecutorApp.Controllers
|
||||
}
|
||||
|
||||
// СТРАНИЦА ДЕЛ
|
||||
|
||||
public IActionResult Cases()
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
if (APIClient.Executor == null)
|
||||
{
|
||||
return Redirect("~/Home/Enter");
|
||||
return Redirect("~/Home/EnterExecutor");
|
||||
}
|
||||
return
|
||||
View(APIClient.GetRequest<List<CaseViewModel>>($"api/case/getcaselist?executorid={APIClient.User.Id}"));
|
||||
View(APIClient.GetRequest<List<CaseViewModel>>($"api/case/getcaselist?executorid={APIClient.Executor.Id}"));
|
||||
}
|
||||
|
||||
// СТРАНИЦА КЛИЕНТОВ
|
||||
public IActionResult Clients()
|
||||
{
|
||||
|
||||
if (APIClient.User == null)
|
||||
if (APIClient.Executor == null)
|
||||
{
|
||||
return Redirect("~/Home/Enter");
|
||||
return Redirect("~/Home/EnterExecutor");
|
||||
}
|
||||
return
|
||||
View(APIClient.GetRequest<List<ClientViewModel>>($"api/client/getclientlist?executorid={APIClient.User}"));
|
||||
View(APIClient.GetRequest<List<ClientViewModel>>($"api/client/getclientlist?executorid={APIClient.Executor.Id}"));
|
||||
}
|
||||
// СТРАНИЦА ВИЗИТОВ
|
||||
public IActionResult Visits()
|
||||
{
|
||||
|
||||
if (APIClient.User == null)
|
||||
if (APIClient.Executor == null)
|
||||
{
|
||||
return Redirect("~/Home/Enter");
|
||||
return Redirect("~/Home/EnterExecutor");
|
||||
}
|
||||
return
|
||||
View(APIClient.GetRequest<List<VisitViewModel>>($"api/visit/getvisitlist?executorid={APIClient.User}"));
|
||||
}
|
||||
// Отчёт pdf исполнителя
|
||||
public IActionResult CreateReportClients()
|
||||
{
|
||||
|
||||
if (APIClient.User == null)
|
||||
{
|
||||
return Redirect("~/Home/Enter");
|
||||
}
|
||||
return View();
|
||||
View(APIClient.GetRequest<List<VisitViewModel>>($"api/visit/getvisitlist?executorid={APIClient.Executor.Id}"));
|
||||
}
|
||||
// ЛИЧНЫЕ ДАННЫЕ ИСПОЛНИТЕЛЯ
|
||||
[HttpGet]
|
||||
public IActionResult Privacy()
|
||||
public IActionResult PrivacyExecutor()
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
if (APIClient.Executor == null)
|
||||
{
|
||||
return Redirect("~/Home/Enter");
|
||||
return Redirect("~/Home/EnterExecutor");
|
||||
}
|
||||
//ViewBag.Companies = APIClient.GetRequest<List<CompanyViewModel>>($"api/company/getcompanylist");
|
||||
return View(APIClient.User);
|
||||
//ViewBag.Executors = APIClient.GetRequest<List<ExecutorViewModel>>($"api/executor/getexecutorlist");
|
||||
return View(APIClient.Executor);
|
||||
}
|
||||
[HttpPost]
|
||||
public void Privacy(string login, string password, string fio)
|
||||
public void PrivacyExecutor(string login, string password, string fio)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
if (APIClient.Executor == null)
|
||||
{
|
||||
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
||||
}
|
||||
@ -80,31 +70,30 @@ namespace LawFirmExecutorApp.Controllers
|
||||
{
|
||||
throw new Exception("Введите логин, пароль и ФИО");
|
||||
}
|
||||
APIClient.PostRequest("api/user/updatedata", new
|
||||
APIClient.PostRequest("api/executor/updatedata", new
|
||||
ExecutorBindingModel
|
||||
{
|
||||
Id = APIClient.User.Id,
|
||||
Id = APIClient.Executor.Id,
|
||||
FIO = fio,
|
||||
Email = login,
|
||||
Password = password
|
||||
Password = password,
|
||||
|
||||
});
|
||||
APIClient.User.FIO = fio;
|
||||
APIClient.User.Email = login;
|
||||
APIClient.User.Password = password;
|
||||
Response.Redirect("Cases");
|
||||
APIClient.Executor.FIO = fio;
|
||||
APIClient.Executor.Email = login;
|
||||
APIClient.Executor.Password = password;
|
||||
Response.Redirect("Home/Clients");
|
||||
}
|
||||
|
||||
// РЕГИСТРАЦИЯ ИСПОЛНИТЕЛЯ
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult Register()
|
||||
public IActionResult RegisterExecutor()
|
||||
{
|
||||
//ViewBag.Companies = APIClient.GetRequest<List<CompanyViewModel>>($"api/company/getcompanylist");
|
||||
return View();
|
||||
}
|
||||
[HttpPost]
|
||||
public void Register(string login, string password, string fio)
|
||||
public void RegisterExecutor(string login, string password, string fio)
|
||||
{
|
||||
if (string.IsNullOrEmpty(login) ||
|
||||
string.IsNullOrEmpty(password) || string.IsNullOrEmpty(fio))
|
||||
@ -112,45 +101,40 @@ namespace LawFirmExecutorApp.Controllers
|
||||
throw new Exception("Введите логин, пароль и ФИО");
|
||||
}
|
||||
|
||||
APIClient.PostRequest("api/user/register", new
|
||||
ExecutorBindingModel
|
||||
APIClient.PostRequest("api/executor/register", new
|
||||
ExecutorBindingModel
|
||||
{
|
||||
FIO = fio,
|
||||
Email = login,
|
||||
Password = password
|
||||
|
||||
});
|
||||
Response.Redirect("Enter");
|
||||
Response.Redirect("Home/EnterExecutor");
|
||||
return;
|
||||
}
|
||||
|
||||
// ВХОД ДЛЯ ИСПОЛНИТЕЛЯ
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult Enter()
|
||||
public IActionResult EnterExecutor()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
[HttpPost]
|
||||
public void Enter(string login, string password)
|
||||
public void EnterExecutor(string login, string password)
|
||||
{
|
||||
if (string.IsNullOrEmpty(login) ||
|
||||
string.IsNullOrEmpty(password))
|
||||
{
|
||||
throw new Exception("Введите логин и пароль");
|
||||
}
|
||||
APIClient.User = APIClient.GetRequest<ExecutorViewModel>($"api/user/login?login={login}&password={password}");
|
||||
if (APIClient.User == null)
|
||||
APIClient.Executor = APIClient.GetRequest<ExecutorViewModel>($"api/executor/login?login={login}&password={password}");
|
||||
if (APIClient.Executor == null)
|
||||
{
|
||||
|
||||
Response.Redirect("Enter");
|
||||
|
||||
throw new Exception("Неверный логин/пароль");
|
||||
}
|
||||
else
|
||||
{
|
||||
/*if (APIClient.User.RoleId == 1) { Response.Redirect("/Home/Cases"); }
|
||||
else */
|
||||
throw new Exception();
|
||||
Response.Redirect("Home/Clients");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,130 +0,0 @@
|
||||
using LawFirmContracts.BindingModels.Mails;
|
||||
using LawFirmContracts.BindingModels;
|
||||
using LawFirmContracts.ViewModels;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace LawFirmExecutorApp.Controllers
|
||||
{
|
||||
public class ReportController : Controller
|
||||
{
|
||||
|
||||
/*[HttpGet]
|
||||
public void CreateReportClients(DateTime dateFrom, DateTime dateTo)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
{
|
||||
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
||||
}
|
||||
|
||||
APIClient.GetRequest<List<ReportClientsViewModel>>($"api/report/getclientsreport", new ReportBindingModel
|
||||
{
|
||||
DateFrom = dateFrom,
|
||||
DateTo = dateTo
|
||||
|
||||
|
||||
|
||||
Response.Redirect("CreateReportClients");
|
||||
}*/
|
||||
[HttpPost]
|
||||
|
||||
public void LoadReportClients(DateTime dateFrom, DateTime dateTo)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
{
|
||||
Redirect("~/Home/Enter");
|
||||
}
|
||||
|
||||
APIClient.PostRequest($"api/report/saveclientspdffile", new ReportBindingModel
|
||||
{
|
||||
DateFrom = dateFrom,
|
||||
DateTo = dateTo,
|
||||
CompanyId = APIClient.User.CompanyId
|
||||
});
|
||||
}
|
||||
[HttpPost]
|
||||
|
||||
public void LoadReportClientsHearingWord(int clientId)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
{
|
||||
Redirect("~/Home/Enter");
|
||||
}
|
||||
|
||||
APIClient.PostRequest($"api/report/saveclientswordfile", new ReportBindingModel
|
||||
{
|
||||
|
||||
CompanyId = APIClient.User.CompanyId,
|
||||
ClientId = clientId
|
||||
});
|
||||
}
|
||||
[HttpGet]
|
||||
|
||||
public IActionResult GetReportClientsHearing(int clientId)
|
||||
{
|
||||
ViewBag.Clients = APIClient.GetRequest<List<ClientViewModel>>($"api/client/getclientlist?companyId={APIClient.User.CompanyId}");
|
||||
if (APIClient.User == null)
|
||||
{
|
||||
return Redirect("~/Home/Enter");
|
||||
}
|
||||
|
||||
return View(APIClient.GetRequest<List<ReportClientsHearingViewModel>>($"api/report/getclientsreporthearing?clientid={clientId}&companyId={APIClient.User.CompanyId}"));
|
||||
}
|
||||
[HttpGet]
|
||||
|
||||
public IActionResult LoadReportClients(DateTime dateFrom, DateTime dateTo, string a)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
{
|
||||
return Redirect("~/Home/Enter");
|
||||
}
|
||||
|
||||
return View(APIClient.GetRequest<List<ReportClientsViewModel>>($"api/report/getclientsreport?datefrom={dateFrom}&dateTo={dateTo}&companyId={APIClient.User.CompanyId}"));
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
|
||||
public IActionResult CreateReportClients(DateTime dateFrom, DateTime dateTo)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
{
|
||||
return Redirect("~/Home/Enter");
|
||||
}
|
||||
|
||||
return View(APIClient.GetRequest<List<ReportClientsViewModel>>($"api/report/getclientsreport?datefrom={dateFrom}&dateTo={dateTo}&companyId={APIClient.User.CompanyId}"));
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public void LoadReportClientsHearingExcel(int clientId)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
{
|
||||
Redirect("~/Home/Enter");
|
||||
}
|
||||
|
||||
APIClient.PostRequest($"api/report/saveclientsexcelfile", new ReportBindingModel
|
||||
{
|
||||
|
||||
CompanyId = APIClient.User.CompanyId,
|
||||
ClientId = clientId
|
||||
});
|
||||
}
|
||||
[HttpPost]
|
||||
public void SendClientsPdf(DateTime dateFrom, DateTime dateTo, string organiserEmail)
|
||||
{
|
||||
APIClient.PostRequest($"api/report/saveclientspdffile", new ReportBindingModel
|
||||
{
|
||||
DateFrom = dateFrom,
|
||||
DateTo = dateTo,
|
||||
CompanyId = APIClient.User.CompanyId
|
||||
});
|
||||
APIClient.PostRequest("api/report/mailsend", new MailSendInfoBindingModel
|
||||
{
|
||||
MailAddress = "dimazhelovanov@gmail.com",
|
||||
Subject = "Отчет по клиентам",
|
||||
Text = "Отчет по клиентам с " + dateFrom.ToShortDateString() + " до " + dateTo.ToShortDateString()
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -7,68 +7,58 @@ namespace LawFirmExecutorApp.Controllers
|
||||
{
|
||||
public class VisitController : Controller
|
||||
{
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult VisitClients(int id)
|
||||
{
|
||||
if (APIClient.Executor == null)
|
||||
{
|
||||
return Redirect("~/Home/EnterExecutor");
|
||||
}
|
||||
return
|
||||
View(APIClient.GetRequest<List<ClientViewModel>>($"api/visit/getclientlisttovisit?visitId={id}"));
|
||||
}
|
||||
[HttpGet]
|
||||
public IActionResult AddClient()
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
if (APIClient.Executor == null)
|
||||
{
|
||||
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
||||
}
|
||||
//ViewBag.Visits = APIClient.GetRequest<List<VisitViewModel>>($"api/visit/getvisitlist?companyId={APIClient.User.CompanyId}");
|
||||
//ViewBag.Clients = APIClient.GetRequest<List<ClientViewModel>>($"api/client/getclientlist?companyId={APIClient.User.CompanyId}");
|
||||
ViewBag.Visits = APIClient.GetRequest<List<VisitViewModel>>($"api/visit/getvisitlist?executorId={APIClient.Executor.Id}");
|
||||
ViewBag.Clients = APIClient.GetRequest<List<ClientViewModel>>($"api/client/getclientlist?executorId={APIClient.Executor.Id}");
|
||||
return View();
|
||||
}
|
||||
[HttpPost]
|
||||
public void AddClient(int visitId, int clientId)
|
||||
public void AddClient(int hearId, int clientId)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
if (APIClient.Executor == null)
|
||||
{
|
||||
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
||||
}
|
||||
|
||||
APIClient.PostRequest("api/visit/addclienttovisit", Tuple.Create(new VisitSearchModel { Id = visitId }, clientId));
|
||||
Response.Redirect("/Home/Visits");
|
||||
APIClient.PostRequest("api/visit/addclienttovisit", Tuple.Create(new VisitSearchModel { Id = hearId }, clientId));
|
||||
Response.Redirect("Home/Visits");
|
||||
}
|
||||
[HttpGet]
|
||||
public IActionResult CreateVisit()
|
||||
{
|
||||
//ViewBag.Consultations = APIClient.GetRequest<List<ConsultationViewModel>>($"api/consultation/getconsultationlist?companyId={APIClient.User.CompanyId}");
|
||||
return View();
|
||||
}
|
||||
[HttpPost]
|
||||
public void CreateVisit(DateTime visitDate, int hearingId)
|
||||
public void CreateVisit(DateTime date)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
if (APIClient.Executor == null)
|
||||
{
|
||||
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
||||
}
|
||||
|
||||
//ViewBag.Consultations = APIClient.GetRequest<List<ConsultationViewModel>>($"api/consultation/getconsultationlist?companyId={APIClient.User.CompanyId}");
|
||||
|
||||
APIClient.PostRequest("api/visit/createvisit", new
|
||||
VisitBindingModel
|
||||
VisitBindingModel
|
||||
{
|
||||
VisitDate = visitDate,
|
||||
HearingId = hearingId
|
||||
ExecutorId = APIClient.Executor.Id,
|
||||
VisitDate = date,
|
||||
});
|
||||
Response.Redirect("/Home/Visits");
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public void DeleteVisit(int id)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
{
|
||||
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
||||
}
|
||||
|
||||
APIClient.PostRequest("api/visit/deletevisit", new
|
||||
VisitSearchModel
|
||||
{
|
||||
Id = id
|
||||
});
|
||||
Response.Redirect("/Home/Visits");
|
||||
Response.Redirect("Home/Visits");
|
||||
}
|
||||
[HttpGet]
|
||||
public IActionResult UpdateVisit()
|
||||
@ -76,9 +66,9 @@ namespace LawFirmExecutorApp.Controllers
|
||||
return View();
|
||||
}
|
||||
[HttpPost]
|
||||
public void UpdateVisit(int id, DateTime visitDate, int hearingId)
|
||||
public void UpdateVisit(int id, DateTime date)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
if (APIClient.Executor == null)
|
||||
{
|
||||
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
||||
}
|
||||
@ -87,21 +77,29 @@ namespace LawFirmExecutorApp.Controllers
|
||||
VisitBindingModel
|
||||
{
|
||||
Id = id,
|
||||
VisitDate = visitDate,
|
||||
HearingId = hearingId
|
||||
ExecutorId = APIClient.Executor.Id,
|
||||
VisitDate = date,
|
||||
|
||||
});
|
||||
Response.Redirect("/Home/Visits");
|
||||
Response.Redirect("Home/Visits");
|
||||
}
|
||||
[HttpGet]
|
||||
public IActionResult VisitClients(int id)
|
||||
[HttpPost]
|
||||
public void DeleteVisit(int id)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
if (APIClient.Executor == null)
|
||||
{
|
||||
return Redirect("~/Home/EnterLawyer");
|
||||
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
||||
}
|
||||
return
|
||||
View(APIClient.GetRequest<List<ClientViewModel>>($"api/visit/getclientlisttovisit?visitId={id}"));
|
||||
|
||||
APIClient.PostRequest("api/visit/deletevisit", new
|
||||
VisitBindingModel
|
||||
{
|
||||
ExecutorId = APIClient.Executor.Id,
|
||||
VisitDate = DateTime.Now,
|
||||
Id = id
|
||||
|
||||
});
|
||||
Response.Redirect("Home/Visits");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,11 @@
|
||||
using LawFirmExecutorApp;
|
||||
using LawFirmContracts.BindingModels;
|
||||
using LawFirmContracts.StoragesContracts;
|
||||
using LawFirmContracts.ViewModels;
|
||||
using LawFirmDatabaseImplement.Implements;
|
||||
using LawFimDataModels.Models;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
builder.Services.AddTransient<ICaseStorage, CaseStorage>();
|
||||
builder.Services.AddTransient<IVisitStorage, VisitStorage>();
|
||||
builder.Services.AddTransient<IClientStorage, ClientStorage>();
|
||||
//builder.Services.AddTransient<ICaseStorage, CaseStorage>();
|
||||
//builder.Services.AddTransient<IVisitStorage, VisitStorage>();
|
||||
//builder.Services.AddTransient<IClientStorage, ClientStorage>();
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddControllersWithViews();
|
||||
@ -33,6 +30,6 @@ app.UseAuthorization();
|
||||
|
||||
app.MapControllerRoute(
|
||||
name: "default",
|
||||
pattern: "{controller=Home}/{action=Index}/{id?}");
|
||||
pattern: "{controller=Home}/{action=EnterExecutor}/{id?}");
|
||||
|
||||
app.Run();
|
||||
|
@ -1,6 +1,6 @@
|
||||
@{
|
||||
ViewData["Title"] = "Добавить клиентов";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
//Layout = "~/Views/Shared/_LayoutExecutor.cshtml";
|
||||
}
|
||||
<style>
|
||||
</style>
|
||||
|
@ -3,7 +3,7 @@
|
||||
@model List<ClientViewModel>
|
||||
@{
|
||||
ViewData["Title"] = "Клиенты";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
//Layout = "~/Views/Shared/_LayoutExecutor.cshtml";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h1 class="display-4">Мои клиенты</h1>
|
||||
|
@ -1,6 +1,6 @@
|
||||
@{
|
||||
ViewData["Title"] = "CreateCase";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
//Layout = "~/Views/Shared/_LayoutExecutor.cshtml";
|
||||
}
|
||||
|
||||
<div class="text-center">
|
||||
@ -13,6 +13,29 @@
|
||||
<input type="text" name="name" id="name" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Вид производства</div>
|
||||
<div class="col-8">
|
||||
<input type="text" name="name" id="name" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Статус</div>
|
||||
<div class="col-8">
|
||||
<select id="statusId" name="statusId" class="form-control">
|
||||
<option value="0">Принято</option>
|
||||
<option value="1">АнализДелаИПодготовкаДокументов</option>
|
||||
<option value="2">СлушанияДела</option>
|
||||
<option value="3">ЗакрытиеДела</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Дата создания</div>
|
||||
<div class="col-8">
|
||||
<input type="datetime-local" id="date" name="date" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<input type="submit" value="Создать" class="btn btn-primary" />
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
@{
|
||||
ViewData["Title"] = "Обновить дело";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
//Layout = "~/Views/Shared/_LayoutExecutor.cshtml";
|
||||
}
|
||||
|
||||
<div class="text-center">
|
||||
@ -8,7 +8,13 @@
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Имя</div>
|
||||
<div class="col-4">Имя дела</div>
|
||||
<div class="col-8">
|
||||
<input type="text" name="name" id="name" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Вид производства</div>
|
||||
<div class="col-8">
|
||||
<input type="text" name="name" id="name" />
|
||||
</div>
|
||||
@ -24,4 +30,10 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Дата создания</div>
|
||||
<div class="col-8">
|
||||
<input type="datetime-local" id="date" name="date" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
@ -1,10 +1,10 @@
|
||||
@{
|
||||
ViewData["Title"] = "CreateClient";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
ViewData["Title"] = "Создание клиента";
|
||||
//Layout = "~/Views/Shared/_LayoutExecutor.cshtml";
|
||||
}
|
||||
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Создание клиента</h2>
|
||||
<h2 class="display-4">Создание клиента </h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
@ -13,22 +13,22 @@
|
||||
<input type="text" name="fio" id="fio" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">E-mail</div>
|
||||
<div class="col-8">
|
||||
<input type="text" name="email" id="email" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Номер телефона</div>
|
||||
<div class="col-8">
|
||||
<input type="number" id="phone" name="phone" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">E-mail</div>
|
||||
<div class="col-8">
|
||||
<input type="text" name="email" id="email" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4">
|
||||
<input type="submit" value="Создать" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
|
@ -1,10 +1,10 @@
|
||||
@{
|
||||
ViewData["Title"] = "Обновить клиента";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
//Layout = "~/Views/Shared/_LayoutExecutor.cshtml";
|
||||
}
|
||||
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Создание клиента</h2>
|
||||
<h2 class="display-4">Изменение клиента</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
@ -13,22 +13,22 @@
|
||||
<input type="text" name="fio" id="fio" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">E-mail</div>
|
||||
<div class="col-8">
|
||||
<input type="text" name="email" id="email" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Номер телефона</div>
|
||||
<div class="col-8">
|
||||
<input type="number" id="phone" name="phone" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">E-mail</div>
|
||||
<div class="col-8">
|
||||
<input type="text" name="email" id="email" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4">
|
||||
<input type="submit" value="Обновить" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
|
@ -1,9 +1,10 @@
|
||||
@using LawFirmContracts.ViewModels;
|
||||
|
||||
@model List<CaseViewModel>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Дела";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
//Layout = "~/Views/Shared/_LayoutGuarantor.cshtml";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h1 class="display-4">Мои дела</h1>
|
||||
@ -29,15 +30,18 @@
|
||||
<th>
|
||||
Имя
|
||||
</th>
|
||||
<th>
|
||||
Вид производства
|
||||
</th>
|
||||
<th>
|
||||
Статус
|
||||
</th>
|
||||
<th>
|
||||
Дата открытия
|
||||
</th>
|
||||
<th>
|
||||
Дата закрытия
|
||||
</th>
|
||||
<th>
|
||||
Статус
|
||||
</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
@ -51,6 +55,12 @@
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Name)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CaseType)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Status)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.DateCreate)
|
||||
</td>
|
||||
@ -58,30 +68,14 @@
|
||||
@Html.DisplayFor(modelItem => item.DateImplement)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Status)
|
||||
<button type="submit" class="btn btn-danger">Удалить</button>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<form action="/Case/DeleteCase" method="post">
|
||||
<input type="hidden" name="id" value="@item.Id" />
|
||||
<button type="submit" class="btn btn-danger">Удалить</button>
|
||||
</form>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<form action="/Case/UpdateCase">
|
||||
<input type="hidden" name="id" value="@item.Id" />
|
||||
<button type="submit" class="btn btn-danger">Изменить имя</button>
|
||||
</form>
|
||||
<button type="submit" class="btn btn-danger">Изменить</button>
|
||||
</td>
|
||||
<td>
|
||||
<form action="/Case/CaseClients">
|
||||
<input type="hidden" name="id" value="@item.Id" />
|
||||
<button type="submit" class="btn btn-danger">Клиенты</button>
|
||||
</form>
|
||||
<button type="submit" class="btn btn-danger">Клиенты</button>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
|
@ -1,9 +1,10 @@
|
||||
@using LawFirmContracts.ViewModels;
|
||||
|
||||
@model List<ClientViewModel>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Clients";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
//Layout = "~/Views/Shared/_LayoutGuarantor.cshtml";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h1 class="display-4">Мои клиенты</h1>
|
||||
@ -53,21 +54,12 @@
|
||||
@Html.DisplayFor(modelItem => item.Phone)
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<form action="/Client/DeleteClient" method="post">
|
||||
<input type="hidden" name="id" value="@item.Id" />
|
||||
<button type="submit" class="btn btn-danger">Удалить</button>
|
||||
</form>
|
||||
|
||||
<button type="submit" class="btn btn-danger">Удалить</button>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<form action="/Client/UpdateClient">
|
||||
<input type="hidden" name="id" value="@item.Id" />
|
||||
<button type="submit" class="btn btn-danger">Изменить</button>
|
||||
</form>
|
||||
<button type="submit" class="btn btn-danger">Изменить</button>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
|
@ -1,6 +1,6 @@
|
||||
@{
|
||||
ViewData["Title"] = "Enter";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
//Layout = "~/Views/Shared/_LayoutGuarantor.cshtml";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Вход в приложение</h2>
|
@ -1,62 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>@ViewData["Title"] - LawFirmExecutorApp</title>
|
||||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="~/css/site.css" />
|
||||
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bgwhite border-bottom box-shadow mb-3">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" asp-area="" asp-controller="Home" aspaction="Index">Юридическая фирма "Вас обманут"</a>
|
||||
<button class="navbar-toggler" type="button" datatoggle="collapse" data-target=".navbar-collapse" ariacontrols="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-smrow-reverse">
|
||||
<ul class="navbar-nav flex-grow-1">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Cases">Мои дела</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Clients">Клиенты</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Visits">Визиты</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Enter">Отчёты по слшуаниям</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Enter">Отчёты по клиентам</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Privacy">Личные данные</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Register">Регистрация</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<div class="container">
|
||||
<main role="main" class="pb-3">
|
||||
@RenderBody()
|
||||
</main>
|
||||
</div>
|
||||
<footer class="border-top footer text-muted">
|
||||
<div class="container">
|
||||
© 2024 - Юридическая фирма - <a asp-area="" aspcontroller="Home" asp-action="Privacy">Личные данные</a>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="~/js/site.js" asp-append-version="true"></script>
|
||||
@RenderSection("Scripts", required: false)
|
||||
</body>
|
||||
</html>
|
@ -1,17 +1,19 @@
|
||||
@using LawFirmContracts.ViewModels;
|
||||
@using LawFirmContracts.ViewModels
|
||||
|
||||
@model ExecutorViewModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Privacy Policy";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
//Layout = "~/Views/Shared/_LayoutExecutor.cshtml";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Личные данные</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Логин:</div>
|
||||
<div class="col-4">Электронная почта:</div>
|
||||
<div class="col-8">
|
||||
<input type="text" name="login"
|
||||
<input type="text" name="email"
|
||||
value="@Model.Email" />
|
||||
</div>
|
||||
</div>
|
||||
@ -35,4 +37,4 @@
|
||||
<input type="submit" value="Сохранить" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
@ -1,6 +1,6 @@
|
||||
@{
|
||||
ViewData["Title"] = "Register";
|
||||
Layout = "/Views/Shared/_Layout.cshtml";
|
||||
//Layout = "~/Views/Shared/_LayoutGuarantor.cshtml";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Регистрация исполнителя</h2>
|
@ -3,7 +3,7 @@
|
||||
@model List<VisitViewModel>
|
||||
@{
|
||||
ViewData["Title"] = "Визиты";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
//Layout = "~/Views/Shared/_LayoutGuarantor.cshtml";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h1 class="display-4">Мои визиты</h1>
|
||||
@ -53,25 +53,13 @@
|
||||
</td>
|
||||
|
||||
<td>
|
||||
|
||||
<form action="/Visit/DeleteVisit" method="post">
|
||||
<input type="hidden" name="id" value="@item.Id" />
|
||||
<button type="submit" class="btn btn-danger">Удалить</button>
|
||||
</form>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<form action="/Visit/UpdateVisit">
|
||||
<input type="hidden" name="id" value="@item.Id" />
|
||||
<button type="submit" class="btn btn-danger">Изменить</button>
|
||||
</form>
|
||||
<button type="submit" class="btn btn-danger">Удалить</button>
|
||||
</td>
|
||||
<td>
|
||||
<form action="/Visit/VisitClients">
|
||||
<input type="hidden" name="id" value="@item.Id" />
|
||||
<button type="submit" class="btn btn-danger">Клиенты</button>
|
||||
</form>
|
||||
<button type="submit" class="btn btn-danger">Изменить</button>
|
||||
</td>
|
||||
<td>
|
||||
<button type="submit" class="btn btn-danger">Клиенты</button>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
@ -19,6 +19,9 @@
|
||||
</button>
|
||||
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
|
||||
<ul class="navbar-nav flex-grow-1">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Clients">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Cases">Дела</a>
|
||||
</li>
|
||||
@ -31,16 +34,9 @@
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Личные данные</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Enter">Отчёт по клиентам</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Enter">Отчёт по слушаниям</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Register">Регистрация</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Enter">Вход</a>
|
||||
</li>
|
||||
@ -58,7 +54,7 @@
|
||||
|
||||
<footer class="border-top footer text-muted">
|
||||
<div class="container">
|
||||
© 2024 - LawFirmExecutorApp - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
||||
© 2024 - LawFirmExecutorApp - <a asp-area="" asp-controller="Home" asp-action="PrivacyExecutor">Privacy</a>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||||
|
@ -1,6 +1,6 @@
|
||||
@{
|
||||
ViewData["Title"] = "Добавление клиентов";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
//Layout = "~/Views/Shared/_LayoutExecutor.cshtml";
|
||||
}
|
||||
<style>
|
||||
</style>
|
||||
|
@ -1,18 +1,16 @@
|
||||
@{
|
||||
ViewData["Title"] = "CreateTaskAssigments";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
ViewData["Title"] = "Создание визита";
|
||||
//Layout = "~/Views/Shared/_LayoutExecutor.cshtml";
|
||||
}
|
||||
<style>
|
||||
</style>
|
||||
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Добавить визит</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">Дата и время</div>
|
||||
<div class="col-8">
|
||||
<input type="datetime-local" placeholder="Введите дату" name="visitDate" id="visitDate">
|
||||
<input type="datetime-local" id="date" name="date" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
@ -1,6 +1,6 @@
|
||||
@{
|
||||
ViewData["Title"] = "Обновить визит";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
//Layout = "~/Views/Shared/_LayoutExecutor.cshtml";
|
||||
}
|
||||
|
||||
<div class="text-center">
|
||||
@ -10,7 +10,7 @@
|
||||
<div class="row">
|
||||
<div class="col-4">Дата</div>
|
||||
<div class="col-8">
|
||||
<input type="text" name="date" id="date" />
|
||||
<input type="datetime-local" id="date" name="date" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
@ -3,7 +3,7 @@
|
||||
@model List<ClientViewModel>
|
||||
@{
|
||||
ViewData["Title"] = "Клиенты";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
//Layout = "~/Views/Shared/_LayoutExecutor.cshtml";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h1 class="display-4">Мои клиенты</h1>
|
||||
|
@ -23,23 +23,22 @@ namespace LawFirmRestApi.Controllers
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public ExecutorViewModel? Login(string fio, string email, string password)
|
||||
public ExecutorViewModel? Login(string login, string password)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _logic.ReadElement(new ExecutorSearchModel
|
||||
{
|
||||
FIO = fio,
|
||||
Email = email,
|
||||
Password = password,
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка входа в систему");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
return _logic.ReadElement(new ExecutorSearchModel
|
||||
{
|
||||
Email = login,
|
||||
Password = password
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка входа в систему");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public void Register(ExecutorBindingModel model)
|
||||
|
Loading…
x
Reference in New Issue
Block a user