@@ -56,16 +56,15 @@ public ActionResult ErWeiMa2(string id = "1611081523323547325feb23206e5")
56
56
ViewBag . Id = id ;
57
57
return View ( ) ;
58
58
}
59
-
60
59
[ HttpPut ]
61
60
[ ValidateInput ( false ) ]
62
61
public ActionResult QianZi ( string id , string PICTURE , string HTMLVALUE )
63
62
{
64
- var pic = "/up/QianZi/" + id + ".png ";
63
+ var pic = "" ;
65
64
if ( ! string . IsNullOrWhiteSpace ( PICTURE ) )
66
65
{
67
66
string path = Server . MapPath ( "~/up/QianZi/" ) ;
68
- var pathErWeiMa = path + id + ".png" ;
67
+ var pathErWeiMa = path + id + ".png" ;
69
68
using ( System . IO . FileStream fs = new System . IO . FileStream ( pathErWeiMa , System . IO . FileMode . OpenOrCreate ) )
70
69
{
71
70
byte [ ] byt = Convert . FromBase64String ( PICTURE ) ;
@@ -75,6 +74,7 @@ public ActionResult QianZi(string id, string PICTURE, string HTMLVALUE)
75
74
fs . Close ( ) ;
76
75
stream . Close ( ) ;
77
76
}
77
+ pic = "/up/QianZi/" + id + ".png" ;
78
78
}
79
79
Common . ClientResult . OrderTaskGong result = new Common . ClientResult . OrderTaskGong ( ) ;
80
80
SIGN sign = new SIGN ( ) ;
@@ -91,6 +91,43 @@ public ActionResult QianZi(string id, string PICTURE, string HTMLVALUE)
91
91
92
92
return Json ( result ) ; //提示创建成功
93
93
}
94
+ [ HttpPut ]
95
+ [ ValidateInput ( false ) ]
96
+ public ActionResult QianZi2 ( string id , string PICTURE , string HTMLVALUE )
97
+ {
98
+ SIGN sign = new SIGN ( ) ;
99
+
100
+ sign . ID = Result . GetNewId ( ) ;
101
+ var pic = "" ;
102
+ if ( ! string . IsNullOrWhiteSpace ( PICTURE ) )
103
+ {
104
+ string path = Server . MapPath ( "~/up/QianZi/" ) ;
105
+ var pathErWeiMa = path + sign . ID + ".png" ;
106
+ using ( System . IO . FileStream fs = new System . IO . FileStream ( pathErWeiMa , System . IO . FileMode . OpenOrCreate ) )
107
+ {
108
+ byte [ ] byt = Convert . FromBase64String ( PICTURE ) ;
109
+ MemoryStream stream = new MemoryStream ( byt ) ;
110
+ System . IO . BinaryWriter w = new System . IO . BinaryWriter ( fs ) ;
111
+ w . Write ( stream . ToArray ( ) ) ;
112
+ fs . Close ( ) ;
113
+ stream . Close ( ) ;
114
+ }
115
+ pic = "/up/QianZi/" + sign . ID + ".png" ;
116
+ }
117
+ Common . ClientResult . OrderTaskGong result = new Common . ClientResult . OrderTaskGong ( ) ;
118
+
119
+ sign . PICTURE = pic ;
120
+ sign . HTMLVALUE = Server . UrlDecode ( HTMLVALUE ) ; //解码
121
+ string currentPerson = GetCurrentPerson ( ) ;
122
+ sign . CREATETIME = DateTime . Now ;
123
+ sign . CREATEPERSON = currentPerson ;
124
+
125
+ sign . UPDATEPERSON = id ;
126
+ result . Code = Common . ClientCode . Succeed ;
127
+ result . Message = Suggestion . InsertSucceed ;
128
+ m_BLL . EditSTATUS2 ( ref validationErrors , sign ) ;
129
+ return Json ( result ) ; //提示创建成功
130
+ }
94
131
/// <summary>
95
132
/// 列表
96
133
/// </summary>
0 commit comments