public string[] GetBucketListItems(string encodedUserName, string encodedSortString, string encodedToken) { IBucketListData bld = null; string[] result = null; try { bld = new BucketListData(Utilities.GetDbSetting()); string decodedUserName = Utilities.DecodeClientBase64String(encodedUserName); string decodedSortString = Utilities.DecodeClientBase64String(encodedSortString); string decodedToken = Utilities.DecodeClientBase64String(encodedToken); //LogParameters(); if (ProcessToken(decodedUserName, decodedToken)) result = bld.GetBucketList(decodedUserName, decodedSortString); else { result = Utilities.GetInValidTokenResponse(); } } catch (Exception e) { bld.LogMsg("Error: " + e.Message + ", trace: " + e.StackTrace.ToString()); } return result; }
public string[] DeleteBucketListItem(int bucketListDbId, string encodedUser, string encodedToken) { IBucketListData bld = null; string[] result = null; try { bld = new BucketListData(Utilities.GetDbSetting()); string decodedToken = Utilities.DecodeClientBase64String(encodedToken); string decodedUserName = Utilities.DecodeClientBase64String(encodedUser); //HACK - needed a demo user quick and I didn't want any changes if (!string.IsNullOrEmpty(decodedUserName) && decodedUserName.Equals("demouser")) { result = Utilities.GetValidTokenResponse(); } else { //LogParameters(); if (ProcessToken(decodedUserName, decodedToken)) { bld.DeleteBucketListItem(bucketListDbId); result = Utilities.GetValidTokenResponse(); } else result = Utilities.GetInValidTokenResponse(); } } catch (Exception e) { bld.LogMsg("Error: " + e.Message + ", trace: " + e.StackTrace.ToString()); } return result; }
public string[] GetDashboard() { IBucketListData bld = null; string[] results = null; try { bld = new BucketListData(Utilities.GetDbSetting()); results = bld.GetDashboard(); } catch (Exception e) { bld.LogMsg("Error: " + e.Message + ", trace: " + e.StackTrace.ToString()); } return results; }