示例#1
0
        public Result Logout(MODEL.Criteria.reqTable req)
        {
            Result result = new Result();

            result.ResultOk = "false";
            RestaurantBLL sv = new RestaurantBLL();

            DAL.Restaurant svDAL = new DAL.Restaurant();
            //DAL.StringCipher sv = new DAL.StringCipher();
            try
            {
                ///Check User
                Result UserComplete = svDAL.checkOrderNotComplete(req.userID);
                if (UserComplete.ResultOk == "true")
                {
                    result.ResultOk      = "false";
                    result.ErrorMessage  = "User not pay !!!";
                    result.ReturnMessage = "";
                    return(result);
                }

                Result CancelTable = svDAL.cancelTable(req);
                result = CancelTable;
            }
            catch (Exception e)
            {
                result.ErrorMessage  = e.Message;
                result.ResultOk      = "false";
                result.ReturnMessage = "";
            }
            return(result);
        }
示例#2
0
        public Result CancelTable(MODEL.Criteria.reqTable req)
        {
            Result result = new Result();

            result.ResultOk = "false";
            RestaurantBLL sv = new RestaurantBLL();

            DAL.Restaurant svDAL = new DAL.Restaurant();
            //DAL.StringCipher sv = new DAL.StringCipher();
            try
            {
                result = svDAL.cancelTable(req);
            }
            catch (Exception e)
            {
                result.ErrorMessage  = e.Message;
                result.ResultOk      = "false";
                result.ReturnMessage = "";
            }
            return(result);
        }