當前位置: 首頁>>代碼示例>>C#>>正文


C# Account.getaccountNumber方法代碼示例

本文整理匯總了C#中Account.getaccountNumber方法的典型用法代碼示例。如果您正苦於以下問題:C# Account.getaccountNumber方法的具體用法?C# Account.getaccountNumber怎麽用?C# Account.getaccountNumber使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Account的用法示例。


在下文中一共展示了Account.getaccountNumber方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: addAccount

    //addAccount function
    //if account is not already present then add account.
    public void addAccount(Account anAccount)
    {
        accounts.Add(anAccount.getaccountNumber(), anAccount);

        if (!accounts.ContainsKey(anAccount.getaccountNumber()))
        {
            accounts.Add(anAccount.getaccountNumber(), anAccount);
        }//end of if
    }//end of add account
開發者ID:turnupthesun123,項目名稱:ATMv1,代碼行數:11,代碼來源:Customer.cs

示例2: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        //start of if
        // if no session variable exists for HBos
        //create session variable
        if (Session["HBos"] == null)
        {
            hBos = new Bank();
        }
        else
        {

            hBos = (Bank)Session["HBos"];
        }
       
        //initialisng session variables.
        login = Convert.ToString(Session["login"]);
        pin = Convert.ToString(Session["pin"]);
        hBos = (Bank)Session["HBos"];

        //creating an instance of account
        Account anAccount = new Account();

        //setting aCustomer to equal the desired customer
        var aCustomer = hBos.getBankCustomer()[login];

        //setting anAccount to equal desired customers account.
        anAccount = aCustomer.getAccount(pin);
        
        //displaying account number, name, and balance
        lblAcc.Text = Convert.ToString(anAccount.getaccountNumber());

        lblName.Text = Convert.ToString(aCustomer.getforename() + " " + aCustomer.getsurname());

        lblBal.Text = Convert.ToString(hBos.getBalance(login, pin));

        Session.Add("HBos", hBos);
    }
開發者ID:turnupthesun123,項目名稱:ATMv1,代碼行數:38,代碼來源:ViewBalance.aspx.cs

示例3: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        //start of if
        // if no session variable exists for HBos
        //create session variable
        if (Session["HBos"] == null)
        {
            hBos = new Bank();
        }
        else
        {

            hBos = (Bank)Session["HBos"];
        }

        login = Convert.ToString(Session["login"]);
        pin = Convert.ToString(Session["pin"]);
        hBos = (Bank)Session["HBos"];
        withdrawn = Convert.ToInt32(Session["Amount"]);

         Account anAccount = new Account();

        var aCustomer = hBos.getBankCustomer()[login];

        anAccount = aCustomer.getAccount(pin);
        
        lblAcc.Text = Convert.ToString(anAccount.getaccountNumber());

        lblName.Text = Convert.ToString(aCustomer.getforename() + " " + aCustomer.getsurname());

        lblBalance.Text = Convert.ToString(hBos.getBalance(login, pin));

        lblWithdrawn.Text = Convert.ToString(withdrawn);

        Session.Add("HBos", hBos);
        Session.Add("Amount", withdrawn);
    }
開發者ID:turnupthesun123,項目名稱:ATMv1,代碼行數:37,代碼來源:Receipt.aspx.cs


注:本文中的Account.getaccountNumber方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。