public JsonResult LoadTableDash(int pagen) { UserInfo uinfo = Session[Constants.SS_USER] as UserInfo; List <LDFTableField> listFields = new List <LDFTableField>(); ATPDashModel atpModel = new ATPDashModel((int)Session["Tabela"]); _model = atpModel; _modelName = "LusiadasSolucaoWeb.Models.ATPDashModel"; JsonResult res = LoadLDFTableDash(pagen, null, JsonConvert.SerializeObject(listFields)); return(res); }
public ActionResult Dash(string hosp, int num) { Session.Remove("Tabela"); if (hosp.ToUpper().Equals("PORTO") || hosp.ToUpper().Equals("LISBOA") || hosp.ToUpper().Equals("ALGARVE")) { switch (hosp.ToUpper()) { case "PORTO": hosp = "HPT"; break; case "LISBOA": hosp = "HLU"; break; case "ALGARVE": hosp = "HSUL"; break; default: hosp = ""; break; } Session[Constants.SS_LOCAL_CONN] = "BD" + hosp + "QLD";; } AddIP(); Session["Tabela"] = num; if (num == null || num <= 0) { ATPDashModel atpTable = new ATPDashModel(20); return(View(atpTable)); } else { ATPDashModel atpTable = new ATPDashModel(num); return(View(atpTable)); } }