public ActionResult Edit(IceHockeyAlliance ia, string keyWord = null, int pageIndex = 1) { return Json(_IIceHockeyAllianceService.EditAlliance(ia)); }
private IceHockeyAlliance GetModel(FormCollection collection) { string leverOther = string.Empty; int lever = 0; if (!int.TryParse(collection["Lever"], out lever)) { return null; } if (lever == 2) { leverOther = "*" + collection["leverOther1" + lever] + "*"; } else if (lever == 3) { leverOther = "*" + collection["leverOther1" + lever] + "*" + collection["leverOther2" + lever] + "*"; } IceHockeyAlliance ia = new IceHockeyAlliance(); ia.AllianceID = Convert.ToInt32(collection["AllianceID"]); ia.Lever = lever; ia.GameType = collection["GameType"].ToUpper(); ia.AllianceName = ia.ShowName = collection["ShowName" + lever]; ia.AllianceUrl = collection["allianceURL" + lever]; ia.LeverOther = leverOther; ia.Display = true; return ia; }