Пример #1
0
        public bool IsPassWordCorrect()
        {
            L2Database DB        = new L2Database();
            var        UserModel = DB.Table("account").Where(new WhereStatement("login", _UserName).Add("password", _PassWord)).Find();

            return(UserModel != null);
        }
Пример #2
0
        public bool IsExist()
        {
            L2Database DB        = new L2Database();
            var        UserModel = DB.Table("account").Where(new WhereStatement("login", _UserName)).Find();

            return(UserModel != null);
        }
Пример #3
0
        public void Login()
        {
            L2Database DB     = new L2Database();
            DataObject Object = new DataObject();

            Object.Add("lastlogin", DateTime.Now);
            DB.Table("account").Update(Object, new WhereStatement("login", _UserName).Add("password", _PassWord));
        }
Пример #4
0
        public void Register()
        {
            L2Database DB     = new L2Database();
            DataObject Object = new DataObject();

            Object.Add("login", _UserName);
            Object.Add("password", _PassWord);
            DB.Table("account").Add(Object);
        }