예제 #1
0
        public async Task <ActionResult> ProdDBEdit(int id)
        {
            var prodDBDeply = await prodRepo.GetProdDBDeployAsync(id);

            //甲方公司
            var PartyList = new List <SelectListItem>();
            var party     = await partyRepo.GetPartyListAsync();

            var party2 = new SelectList(party, "PartyID", "name");

            PartyList.AddRange(party2);
            ViewBag.PartyList = PartyList;
            //产品
            var ProdList = new List <SelectListItem>();
            var prods    = await prodRepo.GetListAsync();

            var prods2 = new SelectList(prods, "ProID", "NAME");

            ProdList.AddRange(prods2);
            ViewBag.ProdList = ProdList;
            //数据库
            //var DBList = new List<SelectListItem>();
            //var dblist = await serverRepo.GetDatabaseDeployListAsync();
            //var dblist2 = new SelectList(dblist, "id", "name");
            //DBList.AddRange(dblist2);
            //ViewBag.DBList = DBList;
            if (prodDBDeply == null)
            {
                prodDBDeply = new ProdDBDeploy();
            }
            return(View(prodDBDeply));
        }
예제 #2
0
        public async Task <ActionResult> IpAddressEdit(int ipid)
        {
            var model = await serverRepo.GetIpAddressAsync(ipid);

            var PartyList = new List <SelectListItem>();
            var party     = await partyRepo.GetPartyListAsync();

            var party2 = new SelectList(party, "PartyID", "name");

            PartyList.AddRange(party2);
            ViewBag.PartyList = PartyList;

            var BeLongList = new List <SelectListItem>();
            var belong     = await CodeRepository.CreateInstance().GetCodesListAsync(ECodesTypeId.IpAddressBeLong);

            var belong2 = new SelectList(belong, "Code", "Text");

            BeLongList.AddRange(belong2);
            ViewBag.BeLongList = BeLongList;

            return(View(model));
        }
예제 #3
0
        public async Task <ActionResult> EditItem(string strItemId)
        {
            Items item = await repoItems.GetItemAsync(strItemId);

            //甲方公司
            var PartyList = new List <SelectListItem>();
            var party     = await partyRepo.GetPartyListAsync();

            var party2 = new SelectList(party, "PartyID", "name");

            PartyList.AddRange(party2);
            ViewBag.PartyList = PartyList;

            ViewData["isRealOnly"] = (item != null).ToString().ToLower();//ItemID不为空时前台控件只读
            if (item == null)
            {
                item = new Items();
            }
            return(View(item));
        }
예제 #4
0
        public async Task <JsonResult> GetPartyList(int page, int rows, string name)
        {
            var tuple = await partyRepo.GetPartyListAsync(page, rows, name);

            return(Json(new { total = tuple.Item1, rows = tuple.Item2 }));
        }