예제 #1
0
        public string ProcessPhoto(Param p)
        {
            bool   success  = false;
            int    clientID = 0;
            string email    = "";

            Data_Access.Data_Access da = new Data_Access.Data_Access();
            if (!da.authenticateUser(p))
            {
                CustomException ce = new CustomException();
                ce.o_statusCode    = 1;
                ce.o_statusMessage = "User is not authorised to access the service";
                ce.Title           = "Unauthroised Access Denied";
                throw new FaultException <CustomException>(ce, "Reason : Unauthorised Access");
            }
            else
            {
                string o_statusMessage = "";
                int    o_status        = -1;
                email = da.Processphoto(p, out o_status, out o_statusMessage, 1);
                if (o_status != 0)
                {
                    success  = false;
                    clientID = 0;
                    CustomException ce = new CustomException();
                    ce.o_statusCode    = o_status;
                    ce.o_statusMessage = o_statusMessage;
                    ce.Title           = "Exception Occured in Registering the User";
                    throw new FaultException <CustomException>(ce, "Reason : Error Occured");
                }
            }
            return(email);
        }
예제 #2
0
        public List <ProfileDetails> ProfileDetails(Param p)
        {
            List <ProfileDetails> cList = new List <ProfileDetails>();

            Data_Access.Data_Access da = new Data_Access.Data_Access();
            if (!da.authenticateUser(p))
            {
                CustomException ce = new CustomException();
                ce.o_statusCode    = 1;
                ce.o_statusMessage = "User is not authorised to access the service";
                ce.Title           = "Unauthroised Access Denied";
                throw new FaultException <CustomException>(ce, "Reason : Unauthorised Access");
            }
            else
            {
                string o_statusMessage = "";
                int    o_status        = -1;
                cList = da.ProfileDetails(p, out o_status, out o_statusMessage, 1);
                if (o_status != 0)
                {
                    CustomException ce = new CustomException();
                    ce.o_statusCode    = o_status;
                    ce.o_statusMessage = o_statusMessage;
                    ce.Title           = "Exception Occured in Getting COuntries";
                    throw new FaultException <CustomException>(ce, "Reason : Error Occured");
                }
            }
            return(cList);
        }
예제 #3
0
        public bool CheckUser(Param p)
        {
            bool success  = false;
            bool clientID = false;

            Data_Access.Data_Access da = new Data_Access.Data_Access();
            if (!da.authenticateUser(p))
            {
                CustomException ce = new CustomException();
                ce.o_statusCode    = 1;
                ce.o_statusMessage = "User is not authorised to access the service";
                ce.Title           = "Unauthroised Access Denied";
                throw new FaultException <CustomException>(ce, "Reason : Unauthorised Access");
            }
            else
            {
                string o_statusMessage = "";
                int    o_status        = -1;
                clientID = da.checkUser(p, out o_status, out o_statusMessage, 1);
                if (clientID)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }

                /* if (o_status != 0)
                 * {
                 *   success = false;
                 *   clientID = false;
                 *   CustomException ce = new CustomException();
                 *   ce.o_statusCode = o_status;
                 *   ce.o_statusMessage = o_statusMessage;
                 *   ce.Title = "Exception Occured in Registering the User";
                 *   throw new FaultException<CustomException>(ce, "Reason : Error Occured");
                 * }*/
            }
        }