예제 #1
0
    private BankCustomer GetBankCustomer()
    {
        BankCustomer aCustomer = new BankCustomer();

        aCustomer.BankCode    = ddBank2.SelectedValue;
        aCustomer.BranchCode  = ddBankBranches2.SelectedValue;
        aCustomer.ApprovedBy  = user.Id;
        aCustomer.DateOfBirth = txtDateOfBirth.Text;
        aCustomer.Email       = txtEmail.Text;
        aCustomer.FirstName   = txtFirstName.Text;
        aCustomer.LastName    = txtLastName.Text;
        aCustomer.OtherName   = txtOtherName.Text;
        aCustomer.Gender      = ddGender.Text;
        if (string.IsNullOrEmpty(txtEmail.Text))
        {
            aCustomer.Id = txtPhoneNumber.Text;
        }
        else
        {
            aCustomer.Id = txtEmail.Text;
        }
        aCustomer.IsActive         = ddIsActive.Text;
        aCustomer.ModifiedBy       = user.Id;
        aCustomer.Password         = bll.GeneratePassword();
        aCustomer.PhoneNumber      = txtPhoneNumber.Text;
        aCustomer.PathToProfilePic = ViewState["ProfilePic"] as string;   //GetPathToProfilePicImage(ddBank.SelectedValue);
        aCustomer.PathToSignature  = ViewState["SignaturePic"] as string; //GetPathToImageOfSignature(ddBank.SelectedValue);
        aCustomer.NextOfKinContact = txtNextOfKinTel.Text;
        aCustomer.NextOfKinName    = txtNextOfKinName.Text;
        aCustomer.MaritalStatus    = ddMaritalStatus.Text;
        aCustomer.Nationality      = txtNationality.Text;
        return(aCustomer);
    }
    private BankCustomer GetBankCustomer()
    {
        BankCustomer aCustomer = new BankCustomer();

        aCustomer.BankCode    = ddBank.SelectedValue;
        aCustomer.BranchCode  = ddBankBranch.SelectedValue;
        aCustomer.DateOfBirth = txtDateOfBirth.Text;
        aCustomer.Email       = txtEmail.Text;
        aCustomer.FirstName   = txtFirstName.Text;
        aCustomer.LastName    = txtLastName.Text;
        aCustomer.OtherName   = txtOtherName.Text;
        aCustomer.Gender      = ddGender.Text;
        if (string.IsNullOrEmpty(txtEmail.Text))
        {
            aCustomer.Id = txtPhoneNumber.Text;
        }
        else
        {
            aCustomer.Id = txtEmail.Text;
        }
        aCustomer.IsActive         = ddIsActive.Text;
        aCustomer.ModifiedBy       = user.Id;
        aCustomer.Password         = bll.GeneratePassword();
        aCustomer.PhoneNumber      = txtPhoneNumber.Text;
        aCustomer.PathToProfilePic = GetPathToProfilePicImage(ddBank.SelectedValue);
        aCustomer.PathToSignature  = GetPathToImageOfSignature(ddBank.SelectedValue);
        aCustomer.ApprovedBy       = user.Id;
        return(aCustomer);
    }
예제 #3
0
    private Bank GetBankFromDetails()
    {
        Bank bank = new Bank();

        bank.BankCode           = txtBankCode.Text;
        bank.BankContactEmail   = txtContactEmail.Text;
        bank.BankId             = "0";
        bank.BankName           = txtBankName.Text;
        bank.BankPassword       = bll.GeneratePassword();
        bank.IsActive           = ddIsActive.SelectedValue;
        bank.ModifiedBy         = user.Id;
        bank.BankThemeColor     = "#" + txtTheme.Text;
        bank.TextColor          = "#" + txtColor.Text;
        bank.BankVaultAccNumber = bll.GenerateAccountNumber();

        //check if user has already upload this stuff
        string publicKey = ViewState["PublicKey"] as String;

        if (string.IsNullOrEmpty(publicKey))
        {
            bank.PathToPublicKey   = GetPathToPublicKey(bank.BankCode);
            bank.PathToLogoImage   = GetPathToLogoImage(bank.BankCode);
            ViewState["PublicKey"] = bank.PathToPublicKey;
            ViewState["BankLogo"]  = bank.PathToLogoImage;
        }
        else
        {
            bank.PathToPublicKey = publicKey;
            bank.PathToLogoImage = ViewState["BankLogo"] as String;
        }
        return(bank);
    }
    private BankUser GetBankUser()
    {
        BankUser aUser = new BankUser();

        aUser.BankCode         = ddBank.SelectedValue;
        aUser.BranchCode       = ddBankBranch.SelectedValue;
        aUser.DateOfBirth      = txtDateOfBirth.Text;
        aUser.Email            = txtEmail.Text;
        aUser.FullName         = txtBankUsersName.Text;
        aUser.Gender           = ddGender.Text;
        aUser.Id               = txtUserId.Text;
        aUser.IsActive         = ddIsActive.Text;
        aUser.ModifiedBy       = user.Id;
        aUser.Password         = bll.GeneratePassword();
        aUser.PhoneNumber      = txtPhoneNumber.Text;
        aUser.Usertype         = ddUserType.SelectedValue;
        aUser.TransactionLimit = txtTranLimit.Text;
        aUser.ApprovedBy       = user.Id;
        return(aUser);
    }
    private BankCustomer GetBankCustomer()
    {
        BankCustomer aUser = new BankCustomer();

        aUser.BankCode         = ddBank.SelectedValue;
        aUser.BranchCode       = ddBankBranch.SelectedValue;
        aUser.DateOfBirth      = txtDateOfBirth.Text;
        aUser.Email            = txtEmail.Text;
        aUser.FullName         = txtBankUsersName.Text;
        aUser.Gender           = ddGender.Text;
        aUser.Id               = txtUserId.Text;
        aUser.IsActive         = ddIsActive.Text;
        aUser.ModifiedBy       = user.Id;
        aUser.Password         = bll.GeneratePassword();
        aUser.PhoneNumber      = txtPhoneNumber.Text;
        aUser.PathToProfilePic = GetPathToProfilePicImage(ddBank.SelectedValue);
        aUser.PathToSignature  = GetPathToImageOfSignature(ddBank.SelectedValue);
        aUser.ApprovedBy       = user.Id;
        return(aUser);
    }