コード例 #1
0
ファイル: BLLSchoolUser.cs プロジェクト: khilje125/iDAS
        public decimal RegisterNewMerchantUser(ModelMerchantUser objModelMerchantUser)
        {
            decimal result            = 0;
            string  getActivationCode = DALUtility.GetEmailActivationCode();

            SqlParameter[] param = new SqlParameter[8];

            param[0] = new SqlParameter("@MerchantNameEN", objModelMerchantUser.MerchantNameEN);
            param[1] = new SqlParameter("@MerchantEmail", objModelMerchantUser.MerchantEmail);
            param[2] = new SqlParameter("@MerchantPassword", EncryptDecrypt.Encrypt(objModelMerchantUser.MerchantPassword));
            param[3] = new SqlParameter("@strAdminUserMobile", objModelMerchantUser.MerchantMobileNumber);
            param[4] = new SqlParameter("@CompanyNameEN", objModelMerchantUser.CompanyNameEN);
            param[5] = new SqlParameter("@sCompanyLogo", objModelMerchantUser.CompanyLogo);
            param[6] = new SqlParameter("@AccountStatus", 1);
            param[7] = new SqlParameter("@ActivationCodeByEmail", getActivationCode);

            result = DALCommon.ExecuteNonQueryReturnIdentity("[sp_Admin_InsertMerchantUser]", param);
            if (result > 0)
            {
                string MerchantKey         = EncryptDecrypt.Encrypt(DALUtility.GetEmailActivationCode());
                string MerchantReferenceID = EncryptDecrypt.GenerateHashCode(result + MerchantKey + System.DateTime.Now);
                if (UpdateMercharAPIKeys(result, MerchantKey, MerchantReferenceID) > 0)
                {
                    SendActivationCode(getActivationCode, objModelMerchantUser.MerchantEmail);
                }
            }
            return(result);
        }
コード例 #2
0
ファイル: BLLSchoolUser.cs プロジェクト: khilje125/iDAS
        //MerchantAccountActivate

        public decimal MerchantAccountActivate(string activationCode)
        {
            string getActivationCode = DALUtility.GetEmailActivationCode();

            SqlParameter[] param = new SqlParameter[1];

            param[0] = new SqlParameter("@ActivationCodeByEmail", activationCode);

            return(DALCommon.ExecuteNonQueryReturnIdentity("[sp_Admin_UpdateMerchantUserActivate]", param));
        }
コード例 #3
0
ファイル: BLLSchoolUser.cs プロジェクト: khilje125/iDAS
        public decimal UpdateMerchantUserPassword(string MerchantEmail, string NewPassword)
        {
            string getActivationCode = DALUtility.GetEmailActivationCode();

            SqlParameter[] param = new SqlParameter[2];

            param[0] = new SqlParameter("@MerchantEmail", MerchantEmail);
            param[1] = new SqlParameter("@MerchantPassword", EncryptDecrypt.Encrypt(NewPassword));

            return(DALCommon.ExecuteNonQueryReturnIdentity("[sp_Admin_UpdateMerchantNewPassword]", param));
        }
コード例 #4
0
ファイル: BLLSchoolUser.cs プロジェクト: khilje125/iDAS
        public decimal SendPasswordRecoveryKey(string MerchantEmailID)
        {
            decimal result            = 0;
            string  getActivationCode = DALUtility.GetEmailActivationCode();

            SqlParameter[] param = new SqlParameter[2];

            param[0] = new SqlParameter("@MerchantEmail", MerchantEmailID);
            param[1] = new SqlParameter("@PasswordRecoveryKey", getActivationCode);

            result = DALCommon.ExecuteNonQueryReturnIdentity("[sp_Admin_UpdateMerchantFogotPasswordKey]", param);
            if (result > 0)
            {
                SendPasswordRecoveryKey(getActivationCode, MerchantEmailID);
            }
            return(result);
        }