//[AuthorizeUser(ActionName = "Administrare", Recursive = false)] public ActionResult Index(string id) { string conStr = Session["conStr"].ToString(); //ConfigurationManager.ConnectionStrings["MySQLConnectionString"].ConnectionString; int uid = Convert.ToInt32(Session["CURENT_USER_ID"]); NotificariEmailView nev = null; if (id == "null") { nev = new NotificariEmailView(uid, conStr, DateTime.Now.Date); } else { nev = new NotificariEmailView(uid, conStr, Convert.ToInt32(id)); } return(PartialView("NotificariEmail", nev)); }
public JsonResult Filter(string _data) { try { string conStr = Session["conStr"].ToString(); //ConfigurationManager.ConnectionStrings["MySQLConnectionString"].ConnectionString; int uid = Convert.ToInt32(Session["CURENT_USER_ID"]); FilterNotificari fn = JsonConvert.DeserializeObject <FilterNotificari>(_data, CommonFunctions.JsonDeserializerSettings); //DateTime d = CommonFunctions.SwitchBackFormatedDate(_data) == null ? new DateTime() : CommonFunctions.SwitchBackFormatedDate(_data).Value.Date; NotificariEmailView nev = new NotificariEmailView(uid, conStr, fn); return(Json(JsonConvert.SerializeObject(nev, Formatting.None, new Newtonsoft.Json.Converters.IsoDateTimeConverter() { DateTimeFormat = CommonFunctions.DATE_FORMAT }), JsonRequestBehavior.AllowGet)); }catch (Exception exp) { LogWriter.Log(exp); response r = new response(false, exp.Message, null, null, new List <Error>() { new Error(exp) }); return(Json(r, JsonRequestBehavior.AllowGet)); } }