41 lines
1.5 KiB
C#
41 lines
1.5 KiB
C#
using System.Net;
|
|
using System.Web.Mvc;
|
|
using Kreta.BusinessLogic.Helpers;
|
|
using Kreta.Core.Exceptions;
|
|
using Kreta.Web.Areas.TanuloErtekeles.ApiControllers;
|
|
using Kreta.Web.Helpers;
|
|
using Kreta.Web.Helpers.Error;
|
|
using Kreta.Web.Models.EditorTemplates;
|
|
|
|
namespace Kreta.Web.Areas.TanuloErtekeles.Controllers
|
|
{
|
|
public class BaseFeljegyzesKeresoController : Controller
|
|
{
|
|
#region Properties
|
|
|
|
public static string GridName => "FeljegyzesKeresoGrid";
|
|
public static string SearchFormName => "FeljegyzesKeresoSearchForm";
|
|
|
|
public static string InfoPopUpId => "FeljegyzesKeresoInfoPopUpWindow";
|
|
|
|
#endregion Properties
|
|
|
|
public ActionResult OpenFeljegyzesKeresoInfoPopUp(int feljegyzesId, int tanuloId, int? osztalyId)
|
|
{
|
|
try
|
|
{
|
|
var co = new FeljegyzesekHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetFeljegyzesById(feljegyzesId, tanuloId, osztalyId);
|
|
var model = BaseFeljegyzesekApiController.ConvertFeljegyzesCoToModel(co);
|
|
|
|
var popUpModel = new PopUpModel(model, "FeljegyzesKereso_Info_PopUp");
|
|
popUpModel = popUpModel.AddCancelBtn(popUpModel, "FeljegyzesKeresoHelper.feljegyzesKeresoInfoPopUpCancel");
|
|
|
|
return PartialView(Constants.General.PopupView, popUpModel);
|
|
}
|
|
catch (BlException ex)
|
|
{
|
|
throw new StatusError(HttpStatusCode.BadRequest, ex.Message);
|
|
}
|
|
}
|
|
}
|
|
}
|