public IActionResult ReportContext(ReportContextViewModel v, string oper) { RefreshStateReportContext(v); if (oper == "change_x31id" && v.SelectedX31ID > 0) { Factory.CBL.SetUserParam(v.UserParamKey, v.SelectedX31ID.ToString()); v.GeneratedTempFileName = ""; } return(View(v)); }
private void RefreshStateReportContext(ReportContextViewModel v) { v.Prefix = v.rec_prefix; if (v.SelectedX31ID > 0) { v.RecX31 = Factory.x31ReportBL.Load(v.SelectedX31ID); v.SelectedReport = v.RecX31.x31Name; if (!System.IO.File.Exists(Factory.App.ReportFolder + "\\" + v.RecX31.x31FileName)) { this.AddMessage("Na serveru nelze dohledat soubor šablony zvolené tiskové sestavy."); } } }
public IActionResult ReportContext(int pid, string prefix, int x31id) { var v = new ReportContextViewModel() { rec_pid = pid, rec_prefix = prefix }; if (string.IsNullOrEmpty(v.rec_prefix) == true || v.rec_pid == 0) { return(StopPage(true, "pid or prefix missing")); } if (x31id == 0) { v.UserParamKey = "ReportContext-" + prefix + "-x31id"; x31id = Factory.CBL.LoadUserParamInt(v.UserParamKey); } v.SelectedX31ID = x31id; RefreshStateReportContext(v); return(View(v)); }