Exemplo n.º 1
0
        //采购形式维护删除

        public ActionResult ShoppingDelete(int id)
        {
            var aid = iab.SelectAll();

            foreach (var item in aid)
            {
                if (item.SID == id)
                {
                    return(Content("<script>alert('正在使用中,不能删除');window.location.href='/systems/shoppingselect'</script>"));
                }
            }

            CaiGouXingShi cgxs = new CaiGouXingShi()
            {
                SID = id
            };

            if (icgxsb.Delete(cgxs) > 0)
            {
                return(Content("<script>alert('删除成功');window.location.href='/systems/shoppingselect'</script>"));
            }
            else
            {
                return(Content("<script>alert('删除失败');window.location.href='/systems/shoppingselect'</script>"));
            }
        }
Exemplo n.º 2
0
 //采购形式维护页面添加
 public ActionResult ShoppingCreate(CaiGouXingShi cgxs)
 {
     if (icgxsb.Add(cgxs) > 0)
     {
         return(Content("ok"));
     }
     else
     {
         return(Content("no"));
     }
     //return View();
 }
Exemplo n.º 3
0
 //采购形式维护修改(进行修改操作)
 // GET: Systems/Create
 public ActionResult ShoppingEdits(CaiGouXingShi cgxs)
 {
     if (icgxsb.Update(cgxs) > 0)
     {
         // return Content("ok");
         return(Content("<script>alert('修改成功');window.location.href='/Systems/ShoppingSelect'</script>"));
     }
     else
     {
         // return Content("no");
         return(Content("<script>alert('修改失败');window.location.href='/Systems/ShoppingSelect'</script>"));
     }
     //  return View();
 }
Exemplo n.º 4
0
 public int Update(CaiGouXingShi t)
 {
     return(icgxsd.Update(t));
 }
Exemplo n.º 5
0
 public int Delete(CaiGouXingShi t)
 {
     return(icgxsd.Delete(t));
 }
Exemplo n.º 6
0
 public int Add(CaiGouXingShi t)
 {
     return(icgxsd.Add(t));
 }