private MethodResult updateEvent(int eventId, DataEntity entity) { var name = entity.GetProperty("eventname"); var code = entity.GetProperty("code"); var startDate = entity.GetDateProperty("starttime"); var endDate = entity.GetDateProperty("enddate"); var locationName = entity.GetProperty("locationname"); var programManager = entity.GetProperty("programmanager"); var max_reg = entity.GetProperty("max_reg"); var status = entity.GetProperty("eventstatus"); var result = DataServicesClient.UpdateEvent(Connection, eventId, name, code, startDate, endDate, locationName, programManager, status, max_reg); if (result.HasError) { return new MethodResult() { Success = false, ErrorInfo = new ErrorResult() { Description = result.Error.ToString() } } } ; return(new MethodResult() { Success = !result.HasError }); }
private MethodResult updateEvent(int eventId, DataEntity entity) { var name = entity.GetProperty("eventname"); var code = entity.GetProperty("code"); var startDate = entity.GetDateProperty("starttime"); var endDate = entity.GetDateProperty("enddate"); var locationName = entity.GetProperty("locationname"); var programManager = entity.GetProperty("programmanager"); var max_reg = entity.GetProperty("max_reg"); var status = entity.GetProperty("eventstatus"); var result = DataServicesClient.UpdateEvent(Connection, eventId, name, code, startDate, endDate, locationName, programManager, status, max_reg); if (result.HasError) return new MethodResult() { Success = false, ErrorInfo = new ErrorResult() { Description = result.Error.ToString() } }; return new MethodResult() { Success = !result.HasError }; }