public PartialViewResult FindCreatives(string searchText) { Models.CreativeListModel m = new Models.CreativeListModel(); using (var client = OltpLogicClient.Open(session_id)) { if (client == null) { return(PartialView("~/Views/Shared/_SessionExpiredView.cshtml")); } Oltp.CreativeDataTable creatives = client.Service.Creative_Get(acc_id, searchText.Trim() + "*", true); foreach (Oltp.CreativeRow creative in creatives) { if (creative.Title.Trim().Length > 0) { m.Creatives.Add(creative); } } } return(PartialView("Table", m)); }
public ActionResult Index(int account, string session) { AppState.AccountID = account; AppState.SessionID = session; acc_id = AppState.AccountID; session_id = AppState.SessionID; Models.CreativeListModel m = new Models.CreativeListModel(); return(View(m)); }
public PartialViewResult FindCreatives(string searchText) { Models.CreativeListModel m = new Models.CreativeListModel(); using (var client = new OltpLogicClient(session_id)) { Oltp.CreativeDataTable creatives = client.Service.Creative_Get(acc_id, searchText + "%", true); foreach (Oltp.CreativeRow creative in creatives) { m.Creatives.Add(creative); } } return(PartialView("Table", m)); }