public JsonResult ExtendAllCard(ActiveCardCustomViewModel obj) { var dateextend = Convert.ToDateTime(obj.DateExtend).ToString("MM/dd/yyyy"); var fee = obj.FeeLevel.Replace(".", "").Replace(",", ""); var dateactive = Convert.ToDateTime(obj.DateActive); fee = "0"; try { var order = new OrderActiveCard { Id = Guid.NewGuid().ToString(), DateCreated = DateTime.Now, Price = 0 }; _OrderActiveCardService.Create(order); var orderid = order != null ? order.Id : ""; var customergroups = GetListChild("", obj.CustomerGroup); //Danh sách thẻ lấy theo query var isSuccess = _tblCardService.AQUA_AddCardExpire(obj.KeyWord, orderid, obj.strIDCards, obj.AnotherKey, obj.CardGroup, "", customergroups, int.Parse(fee), dateextend, GetCurrentUser.GetUser().Id, obj.isAllowNegativeDays); if (isSuccess) { var result = new MessageReport(); result.Message = FunctionHelper.GetLocalizeDictionary("Home", "notification")["updateSuccess"]; result.isSuccess = isSuccess; return(Json(result, JsonRequestBehavior.AllowGet)); } else { var result = new MessageReport(); result.Message = FunctionHelper.GetLocalizeDictionary("Home", "notification")["updateFailed"]; result.isSuccess = isSuccess; return(Json(result, JsonRequestBehavior.AllowGet)); } } catch (Exception ex) { var result = new MessageReport(); result.Message = ex.Message; result.isSuccess = false; return(Json(result, JsonRequestBehavior.AllowGet)); } }