Esempio n. 1
0
        public void ProcessRequest(HttpContext context)
        {
            BARegister bt = new BARegister();

            if (context.Request["A_ID"] != null || context.Request["A_password"] != null)
            {
                string result;
                string AName     = context.Request["A_ID"];
                string APassword = context.Request["A_password"];
                result = bt.ALogin(AName, APassword);
                if (result == "-1")
                {
                    context.Response.Write(-1);
                }
                else
                {
                    context.Response.Write(0);
                }
            }
        }
        public void ProcessRequest(HttpContext context)
        {
            BARegister bt = new BARegister();

            if (context.Request["Manager_name"] != null || context.Request["Manager_phone"] != null)
            {
                string ManagerName     = context.Request["Manager_name"];
                string ManagerPhone    = context.Request["Manager_phone"];
                string ManagerUser     = context.Request["Manager_User"];
                string ManagerPassword = context.Request["Manager_password"];
                if (bt.ARegister(ManagerName, ManagerPhone, ManagerUser, ManagerPassword))
                {
                    context.Response.Write(1);
                }
                else
                {
                    context.Response.Write(0);
                }
            }
        }