コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            AssociateLink associateLink = db.AssociateLinks.Find(id);

            db.AssociateLinks.Remove(associateLink);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 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));
 }
コード例 #3
0
        // 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));
        }
コード例 #4
0
        // 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));
        }
コード例 #5
0
ファイル: Link.cs プロジェクト: brunoo-p/QRCodeGenerator
 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();
     }
 }
コード例 #6
0
 /// <summary>
 /// Click on Association Link
 /// </summary>
 public void ClickAssociationLink()
 {
     AssociateLink.Click();
 }