Beispiel #1
0
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public int Login(StractoryContext context)
        {
            string sql = string.Format("select userid from users where UserName='******' and Password='******'", UserName, Password);

            Console.WriteLine(string.Format("{0}性别为{1}登录成功...", context.Name, context.Sex));
            return(0);
        }
Beispiel #2
0
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="context">公用的上下文信息</param>
        /// <returns></returns>
        public int Login(StractoryContext context)
        {
            string sql = string.Format("select userid from Card where cardNo='{0}'", Card);

            Console.WriteLine(string.Format("{0}性别为{1}成功登录了系统"));
            return(0);
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            IUserAdmin       uc      = new UserAdminCard("NK001");
            StractoryContext context = new StractoryContext(uc);

            context.SetUp();

            IUserAdmin       uass     = new UserAdminSqlServe("001", "123456");
            StractoryContext context1 = new StractoryContext(uass);

            context1.SetUp();
        }