public ActionResult Create(merchant_advertisers Advertiser) { String tReturn = ""; try { Models.AdvertiserModel tModel = new Models.AdvertiserModel(); if (tModel.Create(Advertiser) == true) { tReturn = "{\"status\":\"ok\"}"; } else { tReturn = "{\"status\":\"Failed\"}"; } } catch { tReturn = "{\"status\":\"Failed\"}"; } finally { } return(Json(tReturn, JsonRequestBehavior.AllowGet)); }
// GET: Advertiser/Details/5 public ActionResult GetByMerchant(int id) { Models.AdvertiserModel tModel = new Models.AdvertiserModel(); List <merchant_advertisers> tList = tModel.Get(); return(Json(tList, JsonRequestBehavior.AllowGet)); }
public ActionResult ChangeAdvertiser(int id, merchant_advertisers collection) { String tReturn = ""; try { Models.AdvertiserModel tModel = new Models.AdvertiserModel(); if (tModel.Update(collection)) { tReturn = "{\"status\":\"ok\"}"; } { tReturn = "{\"status\":\"failed\"}"; } } catch { tReturn = "{\"status\":\"failed\"}"; return(Json(tReturn, JsonRequestBehavior.AllowGet)); } return(Json(tReturn, JsonRequestBehavior.AllowGet)); }