コード例 #1
0
        public ResRegistration Registration(ReqRegistration reqRegistration)
        {
            if (String.IsNullOrEmpty(reqRegistration.Password))
            {
                Random rnd = new Random();
                var    a   = StaticConst.Caps[rnd.Next(StaticConst.Caps.Length)].ToString();
                var    b   = StaticConst.Special[rnd.Next(0, StaticConst.Special.Length)].ToString();
                var    c   = StaticConst.Small[rnd.Next(0, StaticConst.Small.Length)].ToString() + StaticConst.Special[rnd.Next(0, StaticConst.Special.Length)].ToString();
                var    d   = StaticConst.Num[rnd.Next(0, StaticConst.Num.Length)].ToString() + StaticConst.Small[rnd.Next(0, StaticConst.Small.Length)].ToString();

                reqRegistration.Password = a + b + c + d;
            }
            ResRegistration resRegistration = new ResRegistration();

            resRegistration = Common <ReqRegistration, ResRegistration> .Serialize_Deserialize(reqRegistration, resRegistration, StaticConst.SP_USERREGISTRATION);

            if (resRegistration.ResponseCode == 1 || resRegistration.ResponseCode == 2)
            {
                ReqEmail reqEmail = new ReqEmail();
                reqEmail.EmailId  = reqRegistration.EmailId;
                reqEmail.UserName = reqRegistration.Name;
                CallThirdParty.SendMailCustom(reqEmail, reqRegistration.Password);
            }
            //CallThirdParty.SendDefaultPassword(reqRegistration.ContactNo, reqRegistration.Password);
            return(resRegistration);
        }
コード例 #2
0
 public ResOtp SendOtp(ReqOtp reqOtp)
 {
     return(CallThirdParty.SendMessage(reqOtp.mobileNo));
 }
コード例 #3
0
 public ResCommon SendMailCustom(ReqEmail reqEmail)
 {
     return(CallThirdParty.SendMailCustom(reqEmail));
 }