public async Task <ActionResult> Index() { List <BaoYangProductLevelUpConfig> config = new List <BaoYangProductLevelUpConfig>(); using (var client = new BaoYangDbClient()) { var serviceResult = await client.SelectBaoYangProductLevelUpConfigAsync(); if (serviceResult.Success) { config = serviceResult.Result.ToList(); } } return(View(config)); }
public async Task <JsonResult> UpdateConfig(string packageType, string baoyangType, bool inSameBrand, bool isActive) { bool result = false; using (var client = new BaoYangDbClient()) { var serviceResult = await client.UpdateBaoYangProductLevelUpConfigAsync(packageType, baoyangType, isActive, inSameBrand, ThreadIdentity.Operator.Name); if (serviceResult.Success) { result = serviceResult.Result; } } return(Json(new { Status = result })); }