protected void rptWebLink_ItemCommand(object source, RepeaterCommandEventArgs e) { int mID = Convert.ToInt32(e.CommandArgument.ToString().Trim()); if (e.CommandName == "_link") { MenuLinksBSO menuLinksBSO = new MenuLinksBSO(); menuLinksBSO.MenuLinksClickUpdate(mID); Response.Redirect(menuLinksBSO.GetMenuLinksById(mID).MenuLinksUrl); } }
protected void ddlMenuLinks_SelectedIndexChanged(object sender, EventArgs e) { MenuLinksBSO menuLinksBSO = new MenuLinksBSO(); MenuLinks menuLinksRows = menuLinksBSO.GetMenuLinksById(Convert.ToInt32(ddlMenuLinks.SelectedValue)); if (menuLinksRows != null) { txtPosition.Text = menuLinksRows.Position; txtWidth.Text = menuLinksRows.Width.ToString(); txtHeight.Text = menuLinksRows.Height.ToString(); } }
protected void initControl(int ID) { if (ID > 0) { txtMenuLinksID.Value = Convert.ToString(ID); btn_add.Visible = false; btn_edit.Visible = true; btn_add1.Visible = false; btn_add2.Visible = false; btn_edit1.Visible = true; try { MenuLinksBSO menuLinksBSO = new MenuLinksBSO(); MenuLinks menuLinksRows = menuLinksBSO.GetMenuLinksById(ID); ddlMenuLinks.SelectedValue = menuLinksRows.MenuLinksParent.ToString(); txtMenuLinksName.Text = menuLinksRows.MenuLinksName; txtMenuLinksUrl.Text = menuLinksRows.MenuLinksUrl; txtRadHelp.Text = menuLinksRows.MenuLinksHelp; hddIcon.Value = menuLinksRows.MenuLinksIcon; hddFile.Value = menuLinksRows.FileName; txtimage4_3.Text = menuLinksRows.MenuLinksIcon; txtFileName.Text = menuLinksRows.FileName; rdbStatus.Checked = menuLinksRows.Status; rdbIsView.Checked = menuLinksRows.IsView; chkFlash.Checked = menuLinksRows.IsFlash; txtPosition.Text = menuLinksRows.Position; ddlTarget.SelectedValue = menuLinksRows.Target.ToString(); txtWidth.Text = menuLinksRows.Width.ToString(); txtHeight.Text = menuLinksRows.Height.ToString(); hddHit.Value = menuLinksRows.Hit.ToString(); if (menuLinksRows.IsFlash) { txtFileName.Visible = true; panelFilename.Visible = true; } else { txtFileName.Visible = false; panelFilename.Visible = false; } if (menuLinksRows.MenuLinksIcon != "") { img_thumb.Text = "<img src='" + menuLinksRows.MenuLinksIcon + "' width='48px'>"; } if (menuLinksRows.IsFlash && menuLinksRows.FileName != "") { ltlFileName.Text = "<a href='" + menuLinksRows.FileName + "' target = '_blank'>File Flash</a>"; } } catch (Exception ex) { clientview.Text = ex.Message.ToString(); } } else { ddlMenuLinks.SelectedIndex = 0; btn_add.Visible = true; btn_edit.Visible = false; btn_add1.Visible = true; btn_add2.Visible = true; btn_edit1.Visible = false; chkFlash.Checked = false; txtFileName.Visible = false; panelFilename.Visible = false; } }