1
yangle
2022-12-06 581ae8632a94a1bc57cafea2d1b948c045f74466
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace test
{
    class Program
    {
        static void Main(string[] args)
        {
            CustomDemo1();
            Console.WriteLine(Convert.ToDecimal(1 / 10));
            Console.WriteLine(1 % 10);
            Console.WriteLine(1 % 10.0);
            Console.WriteLine((float)61 / 111);
            Console.WriteLine((double)61 / 111);
            Console.WriteLine(Math.Round(((decimal)61 / 111), 2));
            Console.WriteLine(Math.Round(((decimal)61 * 100 / 111), 2));
        }
        private static void CustomDemo()
        {
            JArray array = new JArray();
            var entry = new JObject()
            {
                ["HMaterID"] = 100465,
                ["HMaterNumber"] = "S1.06",
                ["HMaterName"] = "智能手机-6S",
                ["HModel"] = " ",
                ["HSourceID"] = 0,
                ["HSourceName"] = null,
                ["HDeptID"] = 100512,
                ["HDeptName"] = "手机车间",
                ["HUnitID"] = 10101,
                ["HUnitName"] = "Pcs",
                ["HQty"] = 100,
                ["HSTATUS"] = "3",
                ["HPlanBeginDate"] = "2022-11-29",
                ["HPlanEndDate"] = "2022-11-29",
            };
            array.Add(entry);
            entry = new JObject()
            {
                ["HMaterID"] = 100465,
                ["HMaterNumber"] = "S1.06",
                ["HMaterName"] = "智能手机-6S",
                ["HModel"] = " ",
                ["HSourceID"] = 0,
                ["HSourceName"] = null,
                ["HDeptID"] = 100512,
                ["HDeptName"] = "手机车间",
                ["HUnitID"] = 10101,
                ["HUnitName"] = "Pcs",
                ["HQty"] = 100,
                ["HSTATUS"] = "3",
                ["HPlanBeginDate"] = "2022-11-29",
                ["HPlanEndDate"] = "2022-11-29",
            };
            array.Add(entry);
            var model = new JObject()
            {
                ["HBillNo"] = "MO000148",
                ["HInterID"] = "100169",
                ["HPRDORGID"] = "100038",
                ["HDate"] = "2022-11-29",
                ["HSeOrderBillNo"] = "",
                ["HSeOrderInterID"] = "0",
                ["HSeOrderEntryID"] = "0",
                ["HEmpName"] = "",
                ["HEmpID"] = "0",
                ["HCenterName"] = "",
                ["HCenterID"] = "0",
                ["HPlanQty"] = "1",
                ["HRemark"] = "CLOUD导入",
                ["HSTATUS"] = "1",
                ["HENTRY"] = array
            };
 
            Console.WriteLine(array);
            Console.WriteLine(model);
            Console.Read();
 
 
        }
 
        private static void CustomDemo1()
        {
            string ret = @"{""code"":""1"",""count"":1,""Message"":""保存成功!"",""data"":1,""list"":null,""Dictlist"":null,""Verify"":null,""HInterID"":null}";
            List<string> ltCodes = new List<string>(System.Text.RegularExpressions.Regex.Split(ret, ","));
            List<string> _ltCodes = new List<string>(ret.Split(new string[] { ", " }, StringSplitOptions.RemoveEmptyEntries));
            Console.WriteLine(ret);
            Console.Read();
        }
 
        public class Root
        {
            /// <summary>
            /// 
            /// </summary>
            public string code { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int count { get; set; }
            /// <summary>
            /// 保存成功!
            /// </summary>
            public string Message { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int data { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string list { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string Dictlist { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string Verify { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string HInterID { get; set; }
        }
    }
}