public void SaveLogs(Entities.Modulos.Llamada.Models.FormLog model) { #region Parameter SQL Dictionary <string, object> parameters = new Dictionary <string, object>(); parameters.Add("@participante_campaña_id", model.LogId); parameters.Add("@participante_telefono_id", model.TelefonoId); parameters.Add("@status_llamada_id", model.StatusId); parameters.Add("@comentarios", model.Comments); parameters.Add("@usuario_id", this.userId); #endregion Execute.StoreProcedure("[dbo].[usp_call_SaveLogs]", parameters); }
public PartialViewResult SaveChanges(Entities.Modulos.Llamada.Models.FormLog model) { model.Status = unit.GetCallStatusList(); model.Telefonos = unit.GetPhoneNumberList(model.LogId); if (ModelState.IsValid) { try { unit.SaveLogs(model); ModelState.AddModelError("OK", "¡Genial! Registro exitoso"); } catch (Exception ex) { ModelState.AddModelError("", ex.Message.ToString()); } } return(PartialView("Forms/_FormLog", model)); }