2018-04-11 开胃学习.Net 系列 - MVC作业收官

2018-04-12  本文已影响0人  Kaiweio

在 _layout里修改了
<p>© @DateTime.Now.Year - My ASP.BANK </p>

作业细节要求

A bank accounts listing with URL suffix /Bank/Account/List, shows all of the accounts presently open.
The user should see this screen upon first logging in.
The listing should show the name of the account, account number and current balance of each one (see create account screen below for details), as well as a link that navigates the user to the account details screen for that account (see below), and a link that deletes the account /Bank/Account/Delete/{id}.
See Html.ActionLink and the Visual Studio scaffolding features for ideas on implementing these links. The user should be asked to confirm the deletion first.

  1. 【已完成】都要先登录再操作
  2. 【已完成】URL后缀 /Bank/Account/List ,其中设置的name就是在Html.ActionLink 会使用到的参数
            routes.MapRoute(
              name: "Index",
              url: "Bank/Account/List",
              defaults: new { controller = "BankAccounts", action = "Index", id = UrlParameter.Optional }
          );
  1. 【已完成】 /Bank/Account/Delete/{id} ,id应该就是创建时候的 PK*
            routes.MapRoute(
              name: "Delete",
              url: "Bank/Account/Delete/{id}",
              defaults: new { controller = "BankAccounts", action = "Delete", id = UrlParameter.Optional }
          );
  1. 【已完成】显示 name of the account, account number and current balance of each one
  2. 【已完成】a link that navigates the user to the account details*

At ASP Bank, we have a clear purpose to help make financial lives better through the power of every connection. We fulfill this purpose through a strategy of responsible growth, which includes a focus on environmental, social and governance leadership.

Every day, we’re proud to partner with 20 million individuals in New York, families and businesses, in hundreds of communities through operations in more than 35 countries to help them achieve their financial goals.

There should exist a Submit and Cancel button at the bottom of the screen. Transactions cannot be deleted once created, though they should be completely hidden from view if the parent account is deleted.
Upon pressing the Submit button, the following validation should occur: all visible fields should be required.
The transaction cannot be for $0.00, less than -$5,000.00 or more than $5,000.00.
Transactions that would bring the account balance below $0.00 are not permitted.
If valid, the transaction should be recorded and the user taken to the account transactions screen, described below. If the user presses the Cancel button, they should be directed to the account details screen described above.

  1. 【已完成】该交易不能为$ 0.00,小于 - $ 5,000.00或超过$ 5,000.00
  2. 【已完成】屏幕底部应该有一个提交和取消按钮。
  3. 【已完成】不允许将账户余额低于0.00美元的交易
  4. 【已完成】如下所述。如果用户按下“取消”按钮,则应将其指向上述帐户 account details screen

  1. 【未完成】交易无法在创建后删除,但如果父账户被删除,它们应该完全隐藏。

  2. 【未完成】按提交按钮后,应该发生以下验证:all visible fields should be required

  3. 【已完成】如果有效,应记录交易并将用户带到 account transactions screen











A transaction details screen (/Bank/Account/{id1}/Transaction/{id2}) where {id1} is a the account number and {id2} is the transaction number. You should validate that the transaction corresponds to the account in question. The transaction details screen should provide a “read only” 3 view of the transaction: date and time of the transaction (month, day, and year, hour and minute), description of the transaction, and the amount of the transaction expressed as a decimal (positive for deposit, negative for check). A button should take the user back to the account details screen. Users should under no circumstance be allowed to view accounts that are not theirs or transactions for accounts that are not theirs. Other requirements are as follows:

  1. 【未解决】/Bank/Account/{id1}/Transaction/{id2}) where {id1}
  2. 【未解决】 这个页面什么都不需要做,没有点击的按钮
  3. 【未解决】数字上有区别!
  4. 【不确定】任何用户都不可以去修改或者查阅不属于他们自己的账户

        @if (item.IsCheck == true)
        {        <td>@String.Format("{0:$#,##0.00;($#,##0.00)}",item.TransactionAmount)         </td>   }
        else {   <td>@String.Format("{0:$#,##0.00;($#,##0.00)}", -item.TransactionAmount)       </td>   }

        @if (item.IsCheck == true)
        {           <td>    check  to      </td>   }
        else {      <td>    deposit to     </td>   }



上一篇下一篇

猜你喜欢

热点阅读