private void ProcessAdsBLL() { if (!AdsBLL.Count_Script()) { int adult = 1; int nonadult = 0; // add ads entry for first time AdsBLL.Add_Script("Horizontal - 728x90", "no script", nonadult); AdsBLL.Add_Script("Horizontal - 728x90", "no script", adult); AdsBLL.Add_Script("Horizontal - 468x60", "no script", nonadult); AdsBLL.Add_Script("Horizontal - 468x60", "no script", adult); AdsBLL.Add_Script("Horizontal - 234x60", "no script", nonadult); AdsBLL.Add_Script("Horizontal - 234x60", "no script", adult); AdsBLL.Add_Script("Vertical - 120x600", "no script", nonadult); AdsBLL.Add_Script("Vertical - 120x600", "no script", adult); AdsBLL.Add_Script("Vertical - 160x600", "no script", nonadult); AdsBLL.Add_Script("Vertical - 160x600", "no script", adult); AdsBLL.Add_Script("Vertical - 120x240", "no script", nonadult); AdsBLL.Add_Script("Vertical - 120x240", "no script", adult); AdsBLL.Add_Script("Square - 336x280", "no script", nonadult); AdsBLL.Add_Script("Square - 336x280", "no script", adult); AdsBLL.Add_Script("Square - 300x250", "no script", nonadult); AdsBLL.Add_Script("Square - 300x250", "no script", adult); AdsBLL.Add_Script("Square - 250x250", "no script", nonadult); AdsBLL.Add_Script("Square - 250x250", "no script", adult); AdsBLL.Add_Script("Square - 200x200", "no script", nonadult); AdsBLL.Add_Script("Square - 200x200", "no script", adult); AdsBLL.Add_Script("Square - 180x150", "no script", nonadult); AdsBLL.Add_Script("Square - 180x150", "no script", adult); AdsBLL.Add_Script("Square - 125x125", "no script", nonadult); AdsBLL.Add_Script("Square - 125x125", "no script", adult); } }
public async Task <ActionResult> getinfo() { var json = new StreamReader(Request.Body).ReadToEnd(); var data = JsonConvert.DeserializeObject <List <AdEntity> >(json); var _posts = await AdsBLL.Load(_context, data[0]); return(Ok(new { posts = _posts[0] })); }
public ActionResult action() { var json = new StreamReader(Request.Body).ReadToEnd(); var data = JsonConvert.DeserializeObject <List <AdEntity> >(json); AdsBLL.ProcessAction(_context, data); return(Ok(new { status = "success", message = "Operationperformedsuccessfully" })); }
public ActionResult action() { var json = new StreamReader(Request.Body).ReadToEnd(); var data = JsonConvert.DeserializeObject <List <AdEntity> >(json); AdsBLL.ProcessAction(_context, data); return(Ok(new { status = "success", message = SiteConfig.generalLocalizer["_records_processed"].Value })); }
protected void MyList_UpdateCommand(object source, DataListCommandEventArgs e) { int id = int.Parse(((Label)e.Item.FindControl("lbl_id")).Text); string value = ((TextBox)e.Item.FindControl("txt_name")).Text; string script = ((TextBox)e.Item.FindControl("txt_adscript")).Text; AdsBLL.Update_Script(id, value, script); // refresh ad update script HttpContext.Current.Application["a" + id] = AdsBLL.Fetch_Ad_Script(id); Config.ShowMessageV2(msg, "Record updated successfully", "Success!", 1); MyList.EditItemIndex = -1; BindList(); }
public async Task <ActionResult> load() { var json = new StreamReader(Request.Body).ReadToEnd(); var data = JsonConvert.DeserializeObject <AdEntity>(json); var _posts = await AdsBLL.Load(_context, data); var _records = 0; if (data.id == 0) { _records = await AdsBLL.Count(_context, data); } return(Ok(new { posts = _posts, records = _records })); }
private void BindList() { DataSet ds = AdsBLL.Load_Ads(int.Parse(drp_sorttype.SelectedValue)); if (ds.Tables[0].Rows.Count > 0) { Pagination_Process.Process_Pagination(MyList, rptPages, lnk_Prev, lnk_Next, 40, this.PageNumber, ds.Tables[0].DefaultView); pnl_main.Visible = true; pnl_norecord.Visible = false; } else { pnl_main.Visible = false; pnl_norecord.Visible = true; } }
public async Task <ActionResult> proc() { var json = new StreamReader(Request.Body).ReadToEnd(); var data = JsonConvert.DeserializeObject <JGN_Ads>(json); if (data.id > 0) { // Update Operation AdsBLL.Update_Field_V3(_context, data.id, data.adscript.ToString(), "adscript"); } else { // Add Operation await AdsBLL.Add_Script(_context, data.name, data.adscript, data.type); } return(Ok(new { status = "success", id = 0, message = "Record Processed" })); }
protected void Page_Load(object send, EventArgs e) { if (!Page.IsPostBack) { if (Config.isAdsEnabled()) { // Square Ad - 336x280 // Adult ID : 14 // Non Adult ID : 13 if (this.isAdult) { // adult section this.Script = AdsBLL.Return_Ad_Script(14); } else { // non adult section this.Script = AdsBLL.Return_Ad_Script(13); } } } }
protected void Page_Load(object send, EventArgs e) { if (!Page.IsPostBack) { if (Config.isAdsEnabled()) { // Horizontal Ad - 728x90 // Adult ID : 4 // Non Adult ID : 3 if (this.isAdult) { // adult section this.Script = AdsBLL.Return_Ad_Script(4); } else { // non adult section this.Script = AdsBLL.Return_Ad_Script(3); } } } }
protected void Page_Load(object send, EventArgs e) { if (!Page.IsPostBack) { if (Config.isAdsEnabled()) { // Vertical Ad - 120x240 // Adult ID : 12 // Non Adult ID : 11 if (this.isAdult) { // adult section this.Script = AdsBLL.Return_Ad_Script(12); } else { // non adult section this.Script = AdsBLL.Return_Ad_Script(11); } } } }
protected void Page_Load(object send, EventArgs e) { if (!Page.IsPostBack) { if (Config.isAdsEnabled()) { // Square Ad - 180x150 // Adult ID : 22 // Non Adult ID : 21 if (this.isAdult) { // adult section this.Script = AdsBLL.Return_Ad_Script(22); } else { // non adult section this.Script = AdsBLL.Return_Ad_Script(21); } } } }