Esempio n. 1
0
 /// <summary>
 /// 三级机构修改
 /// </summary>
 /// <param name="mt"></param>
 /// <returns></returns>
 public ActionResult Update(MechanismThirdModel mt)
 {
     if (imb.MechanismThirdUpdate(mt) > 0)
     {
         return(RedirectToAction("Index"));
     }
     else
     {
         return(RedirectToAction("ToUpdate"));
     }
 }
Esempio n. 2
0
        public int MechanismThirdUpdate(MechanismThirdModel p)
        {
            MechanismThird mt = new MechanismThird()
            {
                Id          = p.Id,
                FirstMid    = p.FirstMid,
                FirstMName  = p.FirstMName,
                IsRetail    = p.IsRetail,
                SalesId     = p.SalesId,
                SecondMid   = p.SecondMid,
                SecondMName = p.SecondMName,
                ThirdMName  = p.ThirdMName,
                ThirdMid    = p.ThirdMid
            };

            return(Update(mt));
        }
Esempio n. 3
0
        public List <MechanismThirdModel> MechanismThirdSelectFirst(string firstId)
        {
            List <MechanismThird>      list  = CreateContext().MechanismThirds.AsNoTracking().Where(e => e.FirstMid == firstId).Select(e => e).ToList();
            List <MechanismThirdModel> list2 = new List <MechanismThirdModel>();

            foreach (var p in list)
            {
                MechanismThirdModel mt = new MechanismThirdModel()
                {
                    Id          = p.Id,
                    FirstMid    = p.FirstMid,
                    FirstMName  = p.FirstMName,
                    IsRetail    = p.IsRetail,
                    SalesId     = p.SalesId,
                    SecondMid   = p.SecondMid,
                    SecondMName = p.SecondMName,
                    ThirdMName  = p.ThirdMName,
                    ThirdMid    = p.ThirdMid
                };
                list2.Add(mt);
            }
            return(list2);
        }
Esempio n. 4
0
        public List <MechanismThirdModel> MechanismThirdSelect()
        {
            List <MechanismThird>      list  = Select();
            List <MechanismThirdModel> list2 = new List <MechanismThirdModel>();

            foreach (var p in list)
            {
                MechanismThirdModel a = new MechanismThirdModel()
                {
                    Id          = p.Id,
                    FirstMid    = p.FirstMid,
                    FirstMName  = p.FirstMName,
                    IsRetail    = p.IsRetail,
                    SalesId     = p.SalesId,
                    SecondMid   = p.SecondMid,
                    SecondMName = p.SecondMName,
                    ThirdMName  = p.ThirdMName,
                    ThirdMid    = p.ThirdMid
                };
                list2.Add(a);
            }
            return(list2);
        }
Esempio n. 5
0
        /// <summary>
        /// 三级机构修改页面
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult ToUpdate(int id)
        {
            MechanismThirdModel mt = imb.MechanismThirdBy(id);

            return(View(mt));
        }
Esempio n. 6
0
 /// <summary>
 /// 三级机构添加
 /// </summary>
 /// <param name="mt"></param>
 /// <returns></returns>
 public ActionResult Add(MechanismThirdModel mt)
 {
     return(Content(imb.MechanismThirdAdd(mt).ToString()));
 }
Esempio n. 7
0
 public int MechanismThirdUpdate(MechanismThirdModel p)
 {
     return(imd.MechanismThirdUpdate(p));
 }
Esempio n. 8
0
 public int MechanismThirdAdd(MechanismThirdModel p)
 {
     return(imd.MechanismThirdAdd(p));
 }