public string MD5Encode(string userName, string password) { string encode = ""; string errorMsg = ADLogin.LoginAD(userName, password); if (errorMsg == "AD Login OK") { userName = userName + ";" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); encode = SecurityBll.Encode(userName); } return(encode); }