Esempio n. 1
0
 public ActionResult third_kind_change(int id, FormCollection collection)
 {
     if (ModelState.IsValid)
     {
         config_file_third_kindModel ctm = new config_file_third_kindModel()
         {
             Id = id,
             third_kind_sale_id   = Request["third_kind_sale_id"],
             third_kind_is_retail = Request["third_kind_is_retail"]
         };
         int i1 = ctb.update1(ctm);
         if (i1 > 0)
         {
             return(JavaScript("window.location='/config_file_third_kind/third_kind_change_success'"));
         }
         else
         {
             return(View());
         }
     }
     else
     {
         return(View());
     }
 }
Esempio n. 2
0
        // GET: configfilethirdkind/Edit/5
        public ActionResult Edit(int id)
        {
            config_file_third_kindModel list = ibt.XGCX(id);

            ViewBag.dt  = YJXlk();
            ViewBag.dt1 = SFXlk();
            return(View(list));
        }
Esempio n. 3
0
        //修改显示
        // GET: config_file_third_kind/Edit/5
        public ActionResult third_kind_change(int id)
        {
            config_file_third_kindModel s1 = ibll.SelectById(id);

            ViewData.Model = s1;
            FillDrop();
            return(View());
        }
        public int del(config_file_third_kindModel cm)
        {
            config_file_third_kind cfk = new config_file_third_kind
            {
                Id = cm.Id
            };

            return(Delete(cfk));
        }
Esempio n. 5
0
        public int TKDel(config_file_third_kindModel st)
        {
            config_file_third_kind est = new config_file_third_kind()
            {
                ftk_id = st.ftk_id,
            };

            return(Delete(est));
        }
        //删除
        public int Del(config_file_third_kindModel st)
        {
            config_file_third_kind st1 = new config_file_third_kind()
            {
                Id = st.Id
            };

            return(Delete(st1));
        }
 //修改
 public ActionResult UpdateThird(config_file_third_kindModel ctm)
 {
     if (ictb.config_file_third_kindUpdate(ctm) > 0)
     {
         return(Content("<script>alert('修改成功!');location.href='/config_file_third_kind/config_file_third_kindShow';</script>"));
     }
     else
     {
         return(Content("<script>alert('修改失败!');location.href='/config_file_third_kind/Update/'+ctm.Id;</script>"));
     }
 }
Esempio n. 8
0
 public ActionResult Edit(int id, FormCollection from)
 {
     try
     {
         string yi = from["first_kind_id"];
         List <config_file_first_kindModel> list = ibf.Select();
         string Yname = null;
         foreach (config_file_first_kindModel item in list)
         {
             if (yi.Equals(item.first_kind_id))
             {
                 Yname = item.first_kind_name;
             }
         }
         string er = from["EJJG"];
         List <config_file_second_kindModel> list2 = ibs.Select();
         string Ename = null;
         foreach (config_file_second_kindModel item in list2)
         {
             if (er.Equals(item.second_kind_id))
             {
                 Ename = item.second_kind_name;
             }
         }
         string bh = ibt.BH().ToString();
         config_file_third_kindModel cn = new config_file_third_kindModel()
         {
             Id                   = id,
             first_kind_id        = yi,
             first_kind_name      = Yname,
             second_kind_id       = er,
             second_kind_name     = Ename,
             third_kind_id        = bh,
             third_kind_is_retail = from["SF"],
             third_kind_name      = from["third_kind_name"],
             third_kind_sale_id   = from["third_kind_sale_id"]
         };
         int b = ibt.Update(cn);
         if (b > 0)
         {
             //return Content("<script>alert('新增成功');window.location.href='index'</script>");
             return(RedirectToAction("xgcg"));
         }
         else
         {
             return(View());
         }
     }
     catch
     {
         return(View());
     }
 }
Esempio n. 9
0
        //新增
        public ActionResult third_kind_register()
        {
            //如果添加失败
            config_file_third_kindModel t = new config_file_third_kindModel();

            t.third_kind_id = ibll.Maxthird_kind_id().ToString();
            ViewData.Model  = t;
            FillDrop();
            FillDrop2();
            //FillDrop3();
            return(View());
        }
Esempio n. 10
0
 public ActionResult Edit(int id, FormCollection collection, config_file_third_kindModel s)
 {
     if (itb.TKUpdate(s) > 0)
     {
         return(RedirectToAction("Index"));
     }
     else
     {
         ViewBag.dt = s;
         return(View());
     }
 }
Esempio n. 11
0
 public ActionResult third_kind_change(config_file_third_kindModel t)
 {
     if (ibll.Update(t) > 0)
     {
         //同一个控制器,只要写Action名,不同控制器要写Action名,控制器名
         return(Content("ok"));
     }
     else
     {
         return(Content("nook"));
     }
 }
 public ActionResult Update(config_file_third_kindModel u)
 {
     // TODO: Add update logic here
     if (isb.Update(u) > 0)
     {
         return(JavaScript("alert('修改成功');window.location.href='/config_file_third_kind/Index'"));
     }
     else
     {
         ViewBag.dt = u;
     }
     return(View());
 }
        public int Add(config_file_third_kindModel item)
        {
            config_file_third_kind ko = new config_file_third_kind();

            ko.Id                   = item.Id;
            ko.first_kind_id        = item.first_kind_id;
            ko.first_kind_name      = item.first_kind_name;
            ko.second_kind_id       = item.second_kind_id;
            ko.second_kind_name     = item.second_kind_name;
            ko.third_kind_id        = item.third_kind_id;
            ko.third_kind_name      = item.third_kind_name;
            ko.third_kind_sale_id   = item.third_kind_sale_id;
            ko.third_kind_is_retail = item.third_kind_is_retail; return(Add(ko));
        }
 //添加
 public ActionResult AddThird(config_file_third_kindModel ctm)
 {
     ctm.third_kind_id    = "0" + ictb.Iconfig_file_third_kindMaxId().ToString();
     ctm.first_kind_name  = icfb.config_file_first_kindSelectByName(ctm.first_kind_id);
     ctm.second_kind_name = icsb.config_file_second_kindSelectByName(ctm.second_kind_id);
     if (ictb.config_file_third_kindAdd(ctm) > 0)
     {
         return(Content("<script>alert('添加成功!');location.href='/config_file_third_kind/config_file_third_kindShow';</script>"));
     }
     else
     {
         return(Content("<script>alert('添加失败!');location.href='/config_file_third_kind/Add';</script>"));
     }
 }
 public ActionResult Create(engage_major_releaseModel em)
 {
     try
     {
         config_file_second_kindModel csm = new config_file_second_kindModel
         {
             second_kind_id = em.second_kind_id
         };
         config_file_first_kindModel cfm = new config_file_first_kindModel
         {
             first_kind_id = em.first_kind_id
         };
         config_file_third_kindModel css = new config_file_third_kindModel
         {
             third_kind_id = em.third_kind_id
         };
         config_major_kindModel cff = new config_major_kindModel
         {
             major_kind_id = em.major_kind_id
         };
         config_majorModel cmm = new config_majorModel
         {
             major_id      = em.major_id,
             major_kind_id = em.major_kind_id
         };
         List <config_file_second_kindModel> lists = sb.SelectByName(csm);
         List <config_file_first_kindModel>  listf = ib.SelectByName(cfm);
         List <config_file_third_kindModel>  lis   = isb.SelectByName(css);
         List <config_major_kindModel>       liss  = ia.SelectByName(cff);
         List <config_majorModel>            litt  = iii.SelectByName(cmm);
         em.second_kind_name = lists[0].second_kind_name;
         em.first_kind_name  = listf[0].first_kind_name;
         em.third_kind_name  = lis[0].third_kind_name;
         em.major_kind_name  = liss[0].major_kind_name;
         em.major_name       = litt[0].major_name;
         em.change_time      = DateTime.Now;
         if (re.Add(em) > 0)
         {
             return(Content("<script>alert('新增成功');window.location='Create'</script>"));
         }
         else
         {
             return(View(em));
         }
     }
     catch
     {
         return(View());
     }
 }
        public int update(config_file_third_kindModel item)
        {
            config_file_third_kind ko = new config_file_third_kind();

            ko.Id                   = item.Id;
            ko.first_kind_id        = item.first_kind_id;
            ko.first_kind_name      = item.first_kind_name;
            ko.second_kind_id       = item.second_kind_id;
            ko.second_kind_name     = item.second_kind_name;
            ko.third_kind_id        = item.third_kind_id;
            ko.third_kind_name      = item.third_kind_name;
            ko.third_kind_sale_id   = item.third_kind_sale_id;
            ko.third_kind_is_retail = item.third_kind_is_retail;   return(ModifyWithOutproNames(ko));
        }
Esempio n. 17
0
        // GET: configfilethirdkind/Delete/5
        public ActionResult Delete(int id)
        {
            config_file_third_kindModel cn = new config_file_third_kindModel()
            {
                Id = id
            };
            int a = ibt.Del(cn);

            if (a > 0)
            {
                return(Content("<script>alert('删除成功');window.location.href='/configfilethirdkind/Index'</script>"));
            }
            return(View());
        }
        public ActionResult Delete(int id)
        {
            config_file_third_kindModel st = new config_file_third_kindModel()
            {
                Id = short.Parse(id.ToString())
            };

            if (isb.Del(st) > 0)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                return(RedirectToAction("Index"));
            }
        }
        public int Add(config_file_third_kindModel cm)
        {
            config_file_third_kind cfk = new config_file_third_kind
            {
                first_kind_id        = cm.first_kind_id,
                second_kind_id       = cm.second_kind_id,
                first_kind_name      = cm.first_kind_name,
                second_kind_name     = cm.second_kind_name,
                third_kind_id        = cm.third_kind_id,
                third_kind_is_retail = cm.third_kind_is_retail,
                third_kind_name      = cm.third_kind_name,
                third_kind_sale_id   = cm.third_kind_sale_id
            };

            return(Add(cfk));
        }
        //删除
        public ActionResult Delete(int id)
        {
            config_file_third_kindModel ctm = new config_file_third_kindModel()
            {
                Id = Convert.ToInt16(id)
            };

            if (ictb.config_file_third_kindDelete(ctm) > 0)
            {
                return(Content("<script>alert('删除成功!');location.href='/config_file_third_kind/config_file_third_kindShow';</script>"));
            }
            else
            {
                return(Content("<script>alert('删除失败!');location.href='/config_file_third_kind/config_file_third_kindShow';</script>"));
            }
        }
Esempio n. 21
0
        //删除
        public ActionResult Del(int id)
        {
            config_file_third_kindModel f1 = new config_file_third_kindModel()
            {
                Id = Convert.ToInt16(id)
            };

            if (ibll.Del(f1) > 0)
            {
                return(Content("ok"));
            }
            else
            {
                return(Content("nook"));
            }
        }
Esempio n. 22
0
        public List <config_file_third_kindModel> SelectIII(string id)
        {
            List <config_file_third_kind>      list1 = SelectBy(e => e.second_kind_id.Equals(id));
            List <config_file_third_kindModel> list2 = new List <config_file_third_kindModel>();

            foreach (var item in list1)
            {
                config_file_third_kindModel c = new config_file_third_kindModel()
                {
                    third_kind_id   = item.third_kind_id,
                    third_kind_name = item.third_kind_name,
                };
                list2.Add(c);
            }
            return(list2);
        }
Esempio n. 23
0
        // GET: config_file_third_kind/Delete/5
        public ActionResult Delete(int id)
        {
            config_file_third_kindModel cm = new config_file_third_kindModel
            {
                Id = id
            };

            if (ib.del(cm) > 0)
            {
                return(Content("<script>alert('删除成功!');window.location.href='/config_file_third_kind/Index'</script>"));
            }
            else
            {
                return(Content("<script>alert('删除成功!');window.location.href='/config_file_third_kind/Index'</script>"));
            }
        }
Esempio n. 24
0
        public int config_file_third_kindUpdate(config_file_third_kindModel ctm)
        {
            config_file_third_kind ctk = new config_file_third_kind()
            {
                Id                   = ctm.Id,
                first_kind_id        = ctm.first_kind_id,
                first_kind_name      = ctm.first_kind_name,
                second_kind_id       = ctm.second_kind_id,
                second_kind_name     = ctm.second_kind_name,
                third_kind_id        = ctm.third_kind_id,
                third_kind_is_retail = ctm.third_kind_is_retail,
                third_kind_name      = ctm.third_kind_name,
                third_kind_sale_id   = ctm.third_kind_sale_id
            };

            return(Update(ctk));
        }
Esempio n. 25
0
        //添加
        public int Add(config_file_third_kindModel st)
        {
            config_file_third_kind st1 = new config_file_third_kind()
            {
                //需要添加的列
                first_kind_id        = st.first_kind_id,
                first_kind_name      = st.first_kind_name,
                second_kind_id       = st.second_kind_id,
                second_kind_name     = st.second_kind_name,
                third_kind_id        = st.third_kind_id,
                third_kind_name      = st.third_kind_name,
                third_kind_sale_id   = st.third_kind_sale_id,
                third_kind_is_retail = st.third_kind_is_retail
            };

            return(Add(st1));
        }
Esempio n. 26
0
        public int TKtAdd(config_file_third_kindModel st)
        {
            config_file_third_kind est = new config_file_third_kind()
            {
                ftk_id               = st.ftk_id,
                first_kind_id        = st.first_kind_id,
                first_kind_name      = st.first_kind_name,
                second_kind_id       = st.second_kind_id,
                second_kind_name     = st.second_kind_name,
                third_kind_id        = st.third_kind_id,
                third_kind_is_retail = st.third_kind_is_retail,
                third_kind_name      = st.third_kind_name,
                third_kind_sale_id   = st.third_kind_sale_id
            };

            return(Add(est));
        }
Esempio n. 27
0
        public ActionResult Delete(int id)
        {
            config_file_third_kindModel sm = new config_file_third_kindModel()
            {
                ftk_id = id
            };
            int result = itb.TKDel(sm);

            if (result > 0)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                return(View());
            }
        }
Esempio n. 28
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="st"></param>
        /// <returns></returns>
        public int Add(config_file_third_kindModel st)
        {
            //把DTO转为EO
            config_file_third_kind est = new config_file_third_kind()
            {
                first_kind_id        = st.first_kind_id,
                first_kind_name      = st.first_kind_name,
                second_kind_id       = st.second_kind_id,
                second_kind_name     = st.second_kind_name,
                third_kind_id        = st.third_kind_id,
                third_kind_name      = st.third_kind_name,
                third_kind_sale_id   = st.third_kind_sale_id,
                third_kind_is_retail = st.third_kind_is_retail
            };

            return(Add(est));
        }
Esempio n. 29
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="st"></param>
        /// <returns></returns>
        public int Update(config_file_third_kindModel st)
        {
            config_file_third_kind est = new config_file_third_kind()
            {
                Id                   = st.Id,
                first_kind_id        = st.first_kind_id,
                first_kind_name      = st.first_kind_name,
                second_kind_id       = st.second_kind_id,
                second_kind_name     = st.second_kind_name,
                third_kind_id        = st.third_kind_id,
                third_kind_name      = st.third_kind_name,
                third_kind_sale_id   = st.third_kind_sale_id,
                third_kind_is_retail = st.third_kind_is_retail
            };

            return(Update(est));
        }
Esempio n. 30
0
 public ActionResult Edit(config_file_third_kindModel cm)
 {
     try
     {
         if (ib.update(cm) > 0)
         {
             return(Content("<script>alert('修改成功!');window.location.href='/config_file_third_kind/Index'</script>"));
         }
         else
         {
             return(Content("<script>alert('修改失败!');window.location.href='/config_file_third_kind/Index'</script>"));
         }
     }
     catch
     {
         return(View(cm));
     }
 }