예제 #1
0
        public List <threeorganizationModel> threeorganizationWhere(string id)
        {
            MyDbContext db = CreateContext();
            List <threeorganization> list = db.threeorganization.AsNoTracking()
                                            .Where(e => e.twoCodeName == id)
                                            .Select(e => e)
                                            .ToList();
            List <threeorganizationModel> list2 = new List <threeorganizationModel>();

            foreach (threeorganization item in list)
            {
                threeorganizationModel last = new threeorganizationModel()
                {
                    threeID         = item.threeID,
                    oneName         = item.oneName,
                    twoCodeName     = item.twoCodeName,
                    threeCode       = item.threeCode,
                    threeCodeName   = item.threeCodeName,
                    threeCodemarket = item.threeCodemarket,
                    threeCodepd     = item.threeCodepd
                };
                list2.Add(last);
            }
            return(list2);
        }
예제 #2
0
        public int threeorganizationDel(threeorganizationModel three)
        {
            threeorganization last = new threeorganization()
            {
                threeID = three.threeID
            };

            return(Delete(last));
        }
예제 #3
0
        public ActionResult Deletethree(int id)
        {
            threeorganizationModel three = new threeorganizationModel()
            {
                threeID = id
            };
            int pd = ithree.threeorganizationDel(three);

            return(Content(JsonConvert.SerializeObject(pd)));
        }
예제 #4
0
 public ActionResult InsertthreeWhere(threeorganizationModel three)
 {
     if (ithree.threeorganizationUpd(three) > 0)
     {
         Response.Write("<script>alert('修改成功')</script>");
         return(Selectthree());
     }
     else
     {
         Response.Write("<script>alert('修改成功')</script>");
         return(View());
     }
 }
예제 #5
0
        public int threeorganizationAdd(threeorganizationModel three)
        {
            threeorganization last = new threeorganization()
            {
                oneName         = three.oneName,
                twoCodeName     = three.twoCodeName,
                threeCode       = three.threeCode,
                threeCodeName   = three.threeCodeName,
                threeCodemarket = three.threeCodemarket,
                threeCodepd     = three.threeCodepd
            };

            return(Add(last));
        }
예제 #6
0
        public int threeorganizationUpd(threeorganizationModel three)
        {
            threeorganization last = new threeorganization()
            {
                threeID         = three.threeID,
                oneName         = three.oneName,
                twoCodeName     = three.twoCodeName,
                threeCode       = three.threeCode,
                threeCodeName   = three.threeCodeName,
                threeCodemarket = three.threeCodemarket,
                threeCodepd     = three.threeCodepd
            };

            return(Update(last));
        }
예제 #7
0
        public ActionResult SelectWherethree(int id)
        {
            List <threeorganizationModel> list  = ithree.threeorganizationSelectWhere(id);
            threeorganizationModel        three = null;

            foreach (threeorganizationModel item in list)
            {
                three = new threeorganizationModel()
                {
                    threeID         = id,
                    oneName         = item.oneName,
                    twoCodeName     = item.twoCodeName,
                    threeCode       = item.threeCode,
                    threeCodeName   = item.threeCodeName,
                    threeCodemarket = item.threeCodemarket,
                    threeCodepd     = item.threeCodepd
                };
            }
            return(View("SelectWherethree", three));
        }
예제 #8
0
        public List <threeorganizationModel> threeorganizationSelect()
        {
            List <threeorganization>      list  = Select();
            List <threeorganizationModel> list2 = new List <threeorganizationModel>();

            foreach (threeorganization item in list)
            {
                threeorganizationModel last = new threeorganizationModel()
                {
                    threeID         = item.threeID,
                    oneName         = item.oneName,
                    twoCodeName     = item.twoCodeName,
                    threeCode       = item.threeCode,
                    threeCodeName   = item.threeCodeName,
                    threeCodemarket = item.threeCodemarket,
                    threeCodepd     = item.threeCodepd
                };
                list2.Add(last);
            }
            return(list2);
        }
예제 #9
0
 public int threeorganizationUpd(threeorganizationModel three)
 {
     return(ithree.threeorganizationUpd(three));
 }