コード例 #1
0
        public ResendOtpResponse ResendOtp(ResendOtpRequest request)
        {
            request.mobile_number = Common.GetStandardMobileNumber(request.mobile_number);
            ResendOtpResponse response = new ResendOtpResponse();

            response.otp_details = new OTPDetailsDto();
            Consumer consumer = null;

            try
            {
                using (UserDao userDao = new UserDao())
                {
                    consumer = userDao.FindByMobileNumber(request.mobile_number);
                }
                if (consumer == null)
                {
                    MakeNouserResponse(response);
                    return(response);
                }

                OTPServices.ResendOTP(response, consumer.PhoneNumber, consumer.ConsID, "C");
                response.code                 = 0;
                response.has_resource         = 1;
                response.message              = MessagesSource.GetMessage("otp.resent");
                response.otp_details.send_otp = 1;
                return(response);
            }
            catch (Exception ex)
            {
                response.MakeExceptionResponse(ex);
                return(response);
            }
        }
コード例 #2
0
        public static ResendOtpResponse ResendOtp(DTOs.Gen.ResendOtpRequest request)
        {
            request.mobile_number = Common.GetStandardMobileNumber(request.mobile_number);
            ResendOtpResponse response = new ResendOtpResponse();

            response.otp_details = new OTPDetailsDto();
            AgentAdmin agentAdmin = null;

            try
            {
                using (AgentAdminDao adminDao = new AgentAdminDao())
                {
                    // agentBoss = GetAuthAgentBoss(request.user_id, request.auth_token, response);
                    agentAdmin = adminDao.FindByMobileNumber(request.mobile_number);
                }
                if (agentAdmin == null)
                {
                    MakeNouserResponse(response);
                    return(response);
                }

                OTPServices.ResendOTP(response, agentAdmin.MobileNumber, agentAdmin.AgadmID, "A");
                response.code                 = 0;
                response.has_resource         = 1;
                response.message              = MessagesSource.GetMessage("otp.resent");
                response.otp_details.send_otp = 1;
                return(response);
            }
            catch (Exception ex)
            {
                response.MakeExceptionResponse(ex);
                return(response);
            }
        }
コード例 #3
0
        public static ResendOtpResponse ResendOtp(ResendOtpRequest request)
        {
            request.mobile_number = Common.GetStandardMobileNumber(request.mobile_number);
            ResendOtpResponse response = new ResendOtpResponse();

            response.otp_details = new OTPDetailsDto();
            AgentBoss agentBoss = null;

            try
            {
                using (AgentBossDao bossDao = new AgentBossDao())
                {
                    agentBoss = bossDao.FindByMobileNumber(request.mobile_number);
                }
                if (agentBoss == null)
                {
                    MakeNouserResponse(response);
                    return(response);
                }

                OTPServices.ResendOTP(response, agentBoss.MobileNumber, agentBoss.AbosID, "B");
                response.code                 = 0;
                response.has_resource         = 1;
                response.message              = MessagesSource.GetMessage("otp.resent");
                response.otp_details.send_otp = 1;
                return(response);
            }
            catch (Exception ex)
            {
                response.MakeExceptionResponse(ex);
                return(response);
            }
        }
コード例 #4
0
        public static ResendOtpResponse ResendOtp(ResendOtpRequest request)
        {
            request.mobile_number = Common.GetStandardMobileNumber(request.mobile_number);
            ResendOtpResponse response = new ResendOtpResponse();

            response.otp_details = new OTPDetailsDto();
            SuperAdmin suerUser = null;

            try
            {
                using (SuperUserDao sUserDao = new SuperUserDao())
                {
                    suerUser = sUserDao.FindByMobileNumber(request.mobile_number);
                }
                if (suerUser == null)
                {
                    MakeNouserResponse(response);
                    return(response);
                }

                OTPServices.ResendOTP(response, suerUser.MobileNum, suerUser.SAdminID, "S");
                response.code                 = 0;
                response.has_resource         = 1;
                response.message              = MessagesSource.GetMessage("otp.resent");
                response.otp_details.send_otp = 1;
                return(response);
            }
            catch (Exception ex)
            {
                response.MakeExceptionResponse(ex);
                return(response);
            }
        }
コード例 #5
0
        public ResendOtpResponse ResendOtp(ResendOtpRequest request)
        {
            request.mobile_number = Common.GetStandardMobileNumber(request.mobile_number);
            ResendOtpResponse response = new ResendOtpResponse();

            response.otp_details = new OTPDetailsDto();
            Driver driver = null;

            try
            {
                using (DriverDao driverDao = new DriverDao())
                {
                    driver = driverDao.FindByMobileNumber(request.mobile_number);
                }
                if (driver == null)
                {
                    MakeNoDriverResponse(response);
                    return(response);
                }

                OTPServices.ResendOTP(response, driver.MobileNumber, driver.DrvrID, "D");
                response.code                 = 0;
                response.has_resource         = 1;
                response.message              = MessagesSource.GetMessage("otp.resent");
                response.otp_details.send_otp = 1;
                return(response);
            }
            catch (Exception ex)
            {
                response.MakeExceptionResponse(ex);
                return(response);
            }
        }