【C# 大写金额转阿拉伯数字】大写金额转数值

 

 public string DealNum(string num)
        {
            string ReturnNum = "";
            switch (num)
            {
                case "":
                    ReturnNum = "0";
                    break;
                case "":
                    ReturnNum = "1";
                    break;
                case "":
                    ReturnNum = "2";
                    break;
                case "":
                    ReturnNum = "3";
                    break;
                case "":
                    ReturnNum = "4";
                    break;
                case "":
                    ReturnNum = "5";
                    break;
                case "":
                    ReturnNum = "6";
                    break;
                case "":
                    ReturnNum = "7";
                    break;
                case "":
                    ReturnNum = "8";
                    break;
                case "":
                    ReturnNum = "9";
                    break;
            }
            return ReturnNum;
        }
 1   /// <summary>
 2         /// 处理单位
 3         /// </summary>
 4         /// <param name="Unit"></param>
 5         /// <returns></returns>
 6         public int DealUnit(string Unit)
 7         {
 8             int unitnum = 1;
 9             switch (Unit)
10             {
11                 case "":
12                     unitnum = 10;
13                     break;
14                 case "":
15                     unitnum = 100;
16                     break;
17                 case "":
18                     unitnum = 1000;
19                     break;
20                 case "":
21                     unitnum = 100;
22                     break;
23                 case "":
24                     unitnum = 1000;
25                     break;
26                 case "":
27                     unitnum = 10000;
28                     break;
29                 case "亿":
30                     unitnum = 100000000;
31                     break;
32             }
33             return unitnum;
34         }

 

 

部分代码  

需要的小伙伴 可留言

 

posted @ 2018-04-25 13:56  ~哎呀  阅读(382)  评论(0编辑  收藏  举报