//删除
        public ActionResult Del(int id)
        {
            config_file_second_kindModel       c  = ibll.SelectById(id);
            List <config_file_third_kindModel> c1 = ibllb.SelectById2(c.second_kind_id);

            if (c1.Count == 0)
            {
                config_file_second_kindModel f1 = new config_file_second_kindModel()
                {
                    Id = Convert.ToInt16(id)
                };

                if (ibll.Del(f1) > 0)
                {
                    return(Content("ok"));
                }
                else
                {
                    return(Content("nook"));
                }
            }
            else
            {
                return(Content("nook"));
            }
        }
        public ActionResult Dele(int id)
        {
            config_file_second_kindModel ss = new config_file_second_kindModel()
            {
                Id = id
            };

            if (st.Del(ss) > 0)
            {
                return(Content("OK"));
            }
            else
            {
                return(Content("ON"));
            }
        }
Beispiel #3
0
        public ActionResult Delete(int id)
        {
            config_file_second_kindModel st = new config_file_second_kindModel()
            {
                Id = short.Parse(id.ToString())
            };

            if (isb.Del(st) > 0)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                return(RedirectToAction("Index"));
            }
        }