示例#1
0
 public static void AddLog(HttpRequestBase re, Acc acc, string message)
 {
     var db = new Logi
     {
         LoginBrower = re.Browser.Browser,
         LoginIP = re.UserHostAddress,
         LoginTime = DateTime.Now,
         LoginName = acc.ID,
         LoginPassword = acc.Pwd,
         LoginMessage = message
     };
     DataADU<Logi>.Add(db);
 }
示例#2
0
        public static void SaveLog(HttpSessionStateBase se, HttpRequestBase re, Acc acc, string message)
        {
            MoLogin mo = new MoLogin(re.UserHostAddress, re.UserHostName, re.Browser.Browser, acc);
            se[MyKeys.SESSION_LOGIN] = mo;

            //记录成功登录时间
            var d = new Logi
            {
                LoginBrower = re.Browser.Browser,
                LoginIP = re.UserHostAddress,
                LoginTime = DateTime.Now,
                LoginName = acc.ID,
                LoginPassword = acc.Pwd,
                LoginMessage = message
            };
            DataADU<Logi>.Add(d);
        }