コード例 #1
0
        private void sendOtp(string fullName, string custIdNo)
        {
            VSLog  vsLogger = new VSLog();
            string response = "";
            string otpNo    = "";

            otpNo = GenerateSignCode(custIdNo);

            Controllers.SMSMessageOperations smsOps = new Controllers.SMSMessageOperations();
            Models.SMSObj smsObj = new Models.SMSObj();

            vsLogger.WriteDebug("Inside SMS Code ");

            smsObj.messageText = "You about to sign a document please provide this ICARS Signing Security OTP " + otpNo + " to the Sales Team Member";
            smsObj.toNumber    = getMobileNumber(custIdNo); // "0834634921";
            //smsObj.toNumber = "0799425095";
            smsObj.olgarsUser = "******";
            smsObj.toUser     = fullName;

            smsObj.olgarsEmail = fullName;


            response = smsOps.sendManualSMSMessage(smsObj, "3", 2);

            //Add the to the DB the OTP
            Models.DigiSignature thisDigiSign = new Models.DigiSignature();

            thisDigiSign.DateAdded         = DateTime.Now;
            thisDigiSign.AddedBy           = fullName;
            thisDigiSign.ResidentId        = custIdNo;
            thisDigiSign.ResidentInitial   = "NotSetup";
            thisDigiSign.ResidentSignature = "NotSetup";
            thisDigiSign.SalesInitial      = "NotSetup";
            thisDigiSign.SalesSignature    = "NotSetup";
            thisDigiSign.WitnessInitial    = "NotSetup";
            thisDigiSign.WitnessName       = "NotSetup";
            thisDigiSign.WitnessSignature  = "NotSetup";
            thisDigiSign.OtpNo             = otpNo;
            thisDigiSign.ServerPath        = GenerateFileName();

            //Remove whatever Signature is there
            //Always a unique combination
            //Need to delete the files as well at some point
            deleteCustId(custIdNo);

            int thiSigId = addSig(thisDigiSign);
        }
コード例 #2
0
        public int addSig(Models.DigiSignature currentSig)
        {
            int StatusId = -1;

            var db = new PetaPoco.Database("Olgarsconnection");

            try
            {
                db.Insert("DigiSignature", "DigiSignatureId", true, currentSig);
                StatusId = currentSig.DigiSignatureId;
            }
            catch (Exception ex)
            {
                string errMessage = "";
                errMessage = ex.Message.ToString();
            }

            return(StatusId);
        }