public ActionResult DeleteConfirmed(int id) { AssociateLink associateLink = db.AssociateLinks.Find(id); db.AssociateLinks.Remove(associateLink); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "AssociateLinkID,RoleID,LinkID")] AssociateLink associateLink) { if (ModelState.IsValid) { db.Entry(associateLink).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.LinkID = new SelectList(db.Links, "LinkID", "URL", associateLink.LinkID); ViewBag.RoleID = new SelectList(db.UserRoles, "RoleID", "RoleName", associateLink.RoleID); return(View(associateLink)); }
// GET: AssociateLinks/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AssociateLink associateLink = db.AssociateLinks.Find(id); if (associateLink == null) { return(HttpNotFound()); } return(View(associateLink)); }
// GET: AssociateLinks/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AssociateLink associateLink = db.AssociateLinks.Find(id); if (associateLink == null) { return(HttpNotFound()); } ViewBag.LinkID = new SelectList(db.Links, "LinkID", "URL", associateLink.LinkID); ViewBag.RoleID = new SelectList(db.UserRoles, "RoleID", "RoleName", associateLink.RoleID); return(View(associateLink)); }
private void btn_createLink_Click(object sender, EventArgs e) { if (tb_link.TextLength > 0) { image = AssociateLink.QrLink(tb_link); form_qr.pb_preview.Image = image; form_qr.lb_direct.Visible = true; if (form_qr.pb_preview.Image == null) { form_qr.pb_preview.Image = Properties.Resources.fora_ar; form_qr.lb_direct.Visible = false; tb_link.Focus(); } } else { tb_link.Focus(); } }
/// <summary> /// Click on Association Link /// </summary> public void ClickAssociationLink() { AssociateLink.Click(); }