public async Task <bool> UpdateProfileAsync(Guid profileId, string profileName, UserProfileType profileType, string profilePassword) { CpAction action = GetAction("UpdateUserProfile"); IList <object> inParameters = new List <object> { MarshallingHelper.SerializeGuid(profileId), profileName, (int)profileType, profilePassword }; IList <object> outParameters = await action.InvokeAsync(inParameters); return((bool)outParameters[0]); }
public static IDbCommand CreateUserProfileCommand(ITransaction transaction, Guid profileId, string name, UserProfileType profileType = UserProfileType.ClientProfile, string password = null, byte[] image = null) { IDbCommand result = transaction.CreateCommand(); result.CommandText = "INSERT INTO USER_PROFILES (PROFILE_ID, NAME, PROFILE_TYPE, PASSWORD, LAST_LOGIN, IMAGE) VALUES (@PROFILE_ID, @NAME, @PROFILE_TYPE, @PASSWORD, @LAST_LOGIN, @IMAGE)"; ISQLDatabase database = transaction.Database; database.AddParameter(result, "PROFILE_ID", profileId, typeof(Guid)); database.AddParameter(result, "NAME", name, typeof(string)); database.AddParameter(result, "PROFILE_TYPE", (int)profileType, typeof(int)); database.AddParameter(result, "PASSWORD", password, typeof(string)); database.AddParameter(result, "LAST_LOGIN", DateTime.Now, typeof(DateTime)); database.AddParameter(result, "IMAGE", image, typeof(byte[])); return(result); }
public static IDbCommand UpdateUserProfileCommand(ITransaction transaction, Guid profileId, string name, UserProfileType profileType = UserProfileType.ClientProfile, string password = null) { IDbCommand result = transaction.CreateCommand(); result.CommandText = "UPDATE USER_PROFILES SET NAME=@NAME, PROFILE_TYPE=@PROFILE_TYPE, PASSWORD=@PASSWORD WHERE PROFILE_ID=@PROFILE_ID"; ISQLDatabase database = transaction.Database; database.AddParameter(result, "PROFILE_ID", profileId, typeof(Guid)); database.AddParameter(result, "NAME", name, typeof(string)); database.AddParameter(result, "PROFILE_TYPE", (int)profileType, typeof(int)); database.AddParameter(result, "PASSWORD", password, typeof(string)); return(result); }
public Task <Guid> CreateProfileAsync(string profileName, UserProfileType profileType, string profilePassword) { return(Task.FromResult(Guid.NewGuid())); }
public static string GetUserProfilePageURL(this UserInfo userInfo, Guid productID, UserProfileType profileType) { return userInfo == null ? "" : CommonLinkUtility.GetUserProfile(userInfo.ID, productID, profileType); }
public static string GetUserProfilePageURL(this UserInfo userInfo, Guid productID, UserProfileType profileType) { return(userInfo == null ? "" : CommonLinkUtility.GetUserProfile(userInfo.ID, productID, profileType)); }
public Task <bool> UpdateProfileAsync(Guid profileId, string profileName, UserProfileType profileType, string profilePassword) { return(Task.FromResult(true)); }
public static string GetUserProfile(string user, Guid productID, UserProfileType userProfileType) { return(GetUserProfile(user, productID, userProfileType, true)); }
public static string GetUserProfile(string user, Guid productID, UserProfileType userProfileType, bool absolute) { var queryParams = ""; if (!String.IsNullOrEmpty(user)) { var guid = Guid.Empty; if (!String.IsNullOrEmpty(user) && 32 <= user.Length && user[8] == '-') { try { guid = new Guid(user); } catch { } } queryParams = guid != Guid.Empty ? GetUserParamsPair(guid) : ParamName_UserUserName + "=" + HttpUtility.UrlEncode(user); } if (productID != Guid.Empty) { queryParams += (String.IsNullOrEmpty(queryParams) ? "?" : "&") + GetProductParamsPair(productID); } var url = VirtualPathUtility.ToAbsolute("~/userprofile.aspx") + "?" + queryParams; if (!absolute) { url = "userprofile.aspx" + "?" + queryParams; } switch (userProfileType) { case UserProfileType.General: break; case UserProfileType.Activity: url += "#activity"; break; case UserProfileType.Statistic: url += "#statistic"; break; case UserProfileType.Subscriptions: url += "#subscriptions"; break; } return url; }
public static string GetUserProfile(string user, Guid productID, UserProfileType userProfileType) { return GetUserProfile(user, productID, userProfileType, true); }
public static string GetUserProfile(Guid userID, Guid productID, UserProfileType userProfileType) { if (!CoreContext.UserManager.UserExists(userID)) return GetEmployees(productID); return GetUserProfile(userID.ToString(), productID, userProfileType); }
public ParkRight(string licensePlate, string operatorId, long parkingZoneId, DateTime startDate, DateTime endDate, decimal amount, UserProfileType userProfileType) { LicensePlate = licensePlate; OperatorId = operatorId; ParkingZoneId = parkingZoneId; StartDate = startDate; EndDate = endDate; Amount = amount; UserProfile = userProfileType; CheckForRules(); }