public JsonResult ScreeningTestSubmit(ScreeningInfoViewModel Model) { Models.Common cm = new Models.Common(); Model.CreatedBy = Convert.ToInt32(Session["UserId"]); var Obj = registerService.ScreeningTestSubmit(Model); if (Obj.MStatus && Obj.IsSelected.HasValue && !Obj.IsSelected.Value && !Model.IsStandBy) { string currentTime = DateTime.Now.ToShortTimeString(); string dt = Model.CreatedDate + " " + currentTime; SendingEmailForRejectedCandidateViewModel objSend = new SendingEmailForRejectedCandidateViewModel { DateOfSending = DateTime.ParseExact(dt, "dd/MM/yyyy HH:mm", CultureInfo.InvariantCulture), Email = Obj.Email, IsActive = true, IsSendEmail = false, RegistrationNo = Obj.RegistrationId }; registerService.SaveSendRejectedEmailInfo(objSend); //cm.GetResult(Model.Email, Convert.ToInt64(Model.ApplicationNo), "Rejected", "Pending"); // Email.SendEmailWithSingleTemplate(Obj.Email, "Spice Star - Candidate Rejected", "~/Templates/RejectedEmailTemplate.html"); } string msg = ""; if (Obj.MStatus) { LogActivityViewModel log = new LogActivityViewModel(); log.EnteredBy = Convert.ToInt32(Session["UserId"]); log.EnteredDate = DateTime.Now; log.ActioName = "ScreeningTestSubmit"; log.ModuleName = "Screenning"; log.ControllerName = "Registration"; log.RegistrationNo = Model.RegistrationId; if (Model.IsSelected.HasValue && !Model.IsSelected.Value) { if (Model.IsStandBy) { msg = "Screening Test (RegNo: " + Model.RegistrationId + ") is on Stand-By!"; log.Activity = "Screenning on stand by"; log.ActivityMessage = "Screening test of registration no " + Model.RegistrationId + " is on Stand-By!"; logActivityService.CreateLogActivity(log); } else { msg = "Screening Test (RegNo: " + Model.RegistrationId + ") is rejected!"; log.Activity = "Screenning as rejected"; log.ActivityMessage = "Screening test of registration no " + Model.RegistrationId + " is rejected!"; logActivityService.CreateLogActivity(log); } } else if (Model.IsSelected.HasValue && Model.IsSelected.Value) { msg = "Screening Test cleared successfully and your Admission Number is: " + Model.RegistrationId + ""; log.Activity = "Screenning cleared"; log.ActivityMessage = "Screening test of registration no " + Model.RegistrationId + " is cleared successfully."; logActivityService.CreateLogActivity(log); } } return(Json(msg, JsonRequestBehavior.AllowGet)); }
public ActionResult UpdateMedicalRemark(int RegNo, string Remark, string MdlStatus, int Id, string tag = null) { int UserId = Convert.ToInt32(Session["UserId"]); var Result = registerService.UpdateMedicalRemark(RegNo, Remark, MdlStatus, Id, UserId, tag); Models.Common cm = new Models.Common(); // cm.GetResult(Result.Email, Convert.ToInt64(Result.ApplicationNo), "Selected", "Rejected"); LogActivityViewModel log = new LogActivityViewModel(); log.EnteredBy = UserId; log.EnteredDate = DateTime.Now; log.ActioName = "UpdateMedicalRemark"; log.ControllerName = "Registration"; log.RegistrationNo = RegNo; if (string.IsNullOrEmpty(Result.Message)) { log.ModuleName = "Medical"; log.Activity = "Medical Rejected"; log.ActivityMessage = "Medical clearance of registraion no " + RegNo + " is not cleared."; } else { log.ModuleName = "Withdrawal"; log.Activity = "Create Withdrawal"; log.ActivityMessage = Result.Message; } logActivityService.CreateLogActivity(log); return(Json(Result.MStatus, JsonRequestBehavior.AllowGet)); }
public ActionResult CreateBook() { Models.Common items = new Models.Common(); ViewBag.items = items.ComboTipoLibro(); ViewBag.itemsAutores = items.ComboAutores(); return(View()); }
// mZarate : Update 2 - Envia conjunto de datos al modelo del formulario. Es invocado cuando su parámetro es un id integer public ActionResult Update(int Id) { Models.Common items = new Models.Common(); ViewBag.items = items.ComboTipoLibro(); ViewBag.itemsAutores = items.ComboAutores(); BookViewModel model = new BookViewModel(); using (Models.bibliotecadbEntities db = new Models.bibliotecadbEntities()) { var oBook = db.T_LIBRO.Find(Id); model.Titulo = oBook.titulo; model.Editorial = oBook.editorial; model.Anio = oBook.año; model.Autor = oBook.autor; model.Tipo = oBook.tipo; return(View(model)); } }
public ActionResult IsStudentScreenningMedicalClearance(int Id, bool status, string Tag) { var info = registerService.IsStudentScreenningMedicalClearance(Id, status, Tag); if (Tag == "Medical") { LogActivityViewModel log = new LogActivityViewModel(); log.EnteredBy = Convert.ToInt32(Session["UserId"]); log.EnteredDate = DateTime.Now; log.ActioName = "IsStudentScreenningMedicalClearance"; log.ModuleName = "Medical"; log.ControllerName = "Registration"; log.Activity = "Medical Selected"; log.ActivityMessage = "Medical clearance of registration no " + info.RegistartionNo + " is cleared."; log.RegistrationNo = info.RegistartionNo; logActivityService.CreateLogActivity(log); Models.Common cm = new Models.Common(); // cm.GetResult(info.Email, Convert.ToInt64(info.ApplicationNo), "Selected", "Selected"); } return(Json(info, JsonRequestBehavior.AllowGet)); }
// mZarate : Retorna vista con listado de libros con acción de Baja o Modificación public ActionResult UpdateBook() { Models.Common lst = new Models.Common(); return(View(lst.ListarLibros())); }
// mZarate : Retorna vista con listado de autores con acción de Baja o Modificación public ActionResult UpdateAuthor() { Models.Common lst = new Models.Common(); return(View(lst.ListarAutores())); }