2018-04-11 開(kāi)胃學(xué)習(xí).Net 系列 - MVC作業(yè)收官

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

作業(yè)細(xì)節(jié)要求

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 ,其中設(shè)置的name就是在Html.ActionLink 會(huì)使用到的參數(shù)
            routes.MapRoute(
              name: "Index",
              url: "Bank/Account/List",
              defaults: new { controller = "BankAccounts", action = "Index", id = UrlParameter.Optional }
          );
  1. 【已完成】 /Bank/Account/Delete/{id} 抵栈,id應(yīng)該就是創(chuàng)建時(shí)候的 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或超過(guò)$ 5,000.00
  2. 【已完成】屏幕底部應(yīng)該有一個(gè)提交和取消按鈕。
  3. 【已完成】不允許將賬戶余額低于0.00美元的交易
  4. 【已完成】如下所述澄步。如果用戶按下“取消”按鈕南缓,則應(yīng)將其指向上述帳戶 account details screen

  1. 【未完成】交易無(wú)法在創(chuàng)建后刪除蛀骇,但如果父賬戶被刪除厌秒,它們應(yīng)該完全隱藏。

  2. 【未完成】按提交按鈕后擅憔,應(yīng)該發(fā)生以下驗(yàn)證:all visible fields should be required

  3. 【已完成】如果有效鸵闪,應(yīng)記錄交易并將用戶帶到 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. 【未解決】 這個(gè)頁(yè)面什么都不需要做,沒(méi)有點(diǎn)擊的按鈕
  3. 【未解決】數(shù)字上有區(qū)別暑诸!
  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>   }



最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末蚌讼,一起剝皮案震驚了整個(gè)濱河市,隨后出現(xiàn)的幾起案子个榕,更是在濱河造成了極大的恐慌篡石,老刑警劉巖,帶你破解...
    沈念sama閱讀 218,122評(píng)論 6 505
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件西采,死亡現(xiàn)場(chǎng)離奇詭異凰萨,居然都是意外死亡,警方通過(guò)查閱死者的電腦和手機(jī)械馆,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,070評(píng)論 3 395
  • 文/潘曉璐 我一進(jìn)店門胖眷,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái),“玉大人霹崎,你說(shuō)我怎么就攤上這事珊搀。” “怎么了尾菇?”我有些...
    開(kāi)封第一講書人閱讀 164,491評(píng)論 0 354
  • 文/不壞的土叔 我叫張陵食棕,是天一觀的道長(zhǎng)。 經(jīng)常有香客問(wèn)我错沽,道長(zhǎng),這世上最難降的妖魔是什么眶拉? 我笑而不...
    開(kāi)封第一講書人閱讀 58,636評(píng)論 1 293
  • 正文 為了忘掉前任千埃,我火速辦了婚禮,結(jié)果婚禮上忆植,老公的妹妹穿的比我還像新娘放可。我一直安慰自己谒臼,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,676評(píng)論 6 392
  • 文/花漫 我一把揭開(kāi)白布耀里。 她就那樣靜靜地躺著蜈缤,像睡著了一般。 火紅的嫁衣襯著肌膚如雪冯挎。 梳的紋絲不亂的頭發(fā)上底哥,一...
    開(kāi)封第一講書人閱讀 51,541評(píng)論 1 305
  • 那天,我揣著相機(jī)與錄音房官,去河邊找鬼趾徽。 笑死,一個(gè)胖子當(dāng)著我的面吹牛翰守,可吹牛的內(nèi)容都是我干的孵奶。 我是一名探鬼主播,決...
    沈念sama閱讀 40,292評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開(kāi)眼蜡峰,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼了袁!你這毒婦竟也來(lái)了?” 一聲冷哼從身側(cè)響起湿颅,我...
    開(kāi)封第一講書人閱讀 39,211評(píng)論 0 276
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤载绿,失蹤者是張志新(化名)和其女友劉穎,沒(méi)想到半個(gè)月后肖爵,有當(dāng)?shù)厝嗽跇?shù)林里發(fā)現(xiàn)了一具尸體卢鹦,經(jīng)...
    沈念sama閱讀 45,655評(píng)論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,846評(píng)論 3 336
  • 正文 我和宋清朗相戀三年劝堪,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了冀自。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 39,965評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡秒啦,死狀恐怖熬粗,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情余境,我是刑警寧澤驻呐,帶...
    沈念sama閱讀 35,684評(píng)論 5 347
  • 正文 年R本政府宣布,位于F島的核電站芳来,受9級(jí)特大地震影響含末,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜即舌,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,295評(píng)論 3 329
  • 文/蒙蒙 一佣盒、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧顽聂,春花似錦肥惭、人聲如沸盯仪。這莊子的主人今日做“春日...
    開(kāi)封第一講書人閱讀 31,894評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)全景。三九已至,卻和暖如春牵囤,著一層夾襖步出監(jiān)牢的瞬間爸黄,已是汗流浹背。 一陣腳步聲響...
    開(kāi)封第一講書人閱讀 33,012評(píng)論 1 269
  • 我被黑心中介騙來(lái)泰國(guó)打工奔浅, 沒(méi)想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留馆纳,地道東北人。 一個(gè)月前我還...
    沈念sama閱讀 48,126評(píng)論 3 370
  • 正文 我出身青樓汹桦,卻偏偏與公主長(zhǎng)得像鲁驶,于是被迫代替她去往敵國(guó)和親。 傳聞我的和親對(duì)象是個(gè)殘疾皇子舞骆,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,914評(píng)論 2 355

推薦閱讀更多精彩內(nèi)容