public static string fn_sUser() { char cX = '\\'; string sUser = General_String_Extensions.fn_ReturnPortionOfStringAfterLastOccuranceOfACharacter(HttpContext.Current.User.Identity.Name, cX); return(sUser); //returns just the short logon name Example for 'accessiicarewnc\ggarson', it returns 'ggarson' }
/// <summary> /// Returns the String HASH of two integers entered as strings /// </summary> /// <param name="sInteger1"></param> /// <param name="sInteger2"></param> /// <returns></returns> static public string fn_stringHash_ofSum_ofTwoIntegers(string sInteger1, string sInteger2) { string sX = ""; try { int iParm_1 = 0; int iParm_2 = 0; int iParm_3 = 0; bool bParm_1_isNumeric = int.TryParse(sInteger1, out iParm_1); bool bParm_2_isNumeric = int.TryParse(sInteger2, out iParm_2); if (bParm_1_isNumeric && bParm_2_isNumeric) { iParm_3 = iParm_1 + iParm_2; sX = General_String_Extensions.fn_ComputeStringOfHash(iParm_3.ToString()); } } catch (Exception e) { Debug.WriteLine("fn_stringHash_ofSum_ofTwoIntegers - Exception!" + e.ToString()); } return(sX); }
/// <summary> /// Returns the String HASH of two integers entered as Integers /// </summary> /// <param name="iInteger1"></param> /// <param name="iInteger2"></param> /// <returns></returns> static public string fn_stringHash_ofSum_ofTwoIntegers(int iInteger1, int iInteger2) { string sX = ""; try { int iParm_3 = 0; iParm_3 = iInteger1 + iInteger2; sX = General_String_Extensions.fn_ComputeStringOfHash(iParm_3.ToString()); } catch (Exception e) { Debug.WriteLine("fn_stringHash_ofSum_ofTwoIntegers - Exception!" + e.ToString()); } return(sX); }