31 lines
801 B
C#
31 lines
801 B
C#
using CompanyManagment.App.Contracts.ContactUs;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
|
|
namespace ServiceHost.Pages.contact_us
|
|
{
|
|
public class IndexModel : PageModel
|
|
{
|
|
private readonly IContactUsApplication _contactUsApplication;
|
|
|
|
public IndexModel(IContactUsApplication contactUsApplication)
|
|
{
|
|
_contactUsApplication = contactUsApplication;
|
|
}
|
|
|
|
public void OnGet()
|
|
{
|
|
}
|
|
|
|
public IActionResult OnPostCreateAjax(CreateContactUs command)
|
|
{
|
|
var operationResult = _contactUsApplication.Create(command);
|
|
return new JsonResult(new
|
|
{
|
|
success = operationResult.IsSuccedded,
|
|
message = operationResult.Message
|
|
});
|
|
}
|
|
}
|
|
}
|