|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
Technique
0 L* o2 b( D" V# A& `On the client side use the vault control to write to a text file.
4 H" N& w- j* YJavaScript ) j" C( L# M$ b
with (top.aras.vault) 1 S7 _8 ]* N1 Q* M
{
3 J2 g* n- ^4 X. O9 S+ \* P fileCreate(filePath); 9 O! @. _; |- l, Y/ W9 [( U
fileOpenAppend(filePath);
9 Z& b/ B4 X! } fileWriteLine('<AML><Item type="MyItemType"/></AML>');
( |% l5 l0 _9 X fileClose(); 0 V4 Z8 g: z2 K* |! v
} / r, Q6 X. N) E, m6 n5 R9 {8 j+ o
Technique
, h; {& {: ? FOn the server side use the File and StreamWriter namespaces to write to a text file. " D6 V/ S, |7 d
C# ! Y' l; Z6 n/ C5 x
Innovator myInnovator = this.newInnovator(); - z \# ~/ b" Y f, |$ L/ Y( T
' _) X* M; q9 }$ Z/ f; F# p$ ?// Save the results to a file.
$ f! z# p) N. p% Z5 V! @0 j5 qstring path = myInnovator.MapPath("temp/yoyo.txt"); & g6 L" ^8 Z; l4 t
try 6 H3 G3 D0 A1 F# d# g
{ 3 x, N" b( H; F3 [
if (File.Exists(path)) File.Delete(path);
- s/ T7 W+ y9 g! q( H' _ StreamWriter sw = File.CreateText(path); & {% b! ?9 P' y+ b4 p1 p
sw.Write(this.dom.InnerXml);
" l# D) X# s% q* b sw.Close(); . f6 P5 y$ z! R2 ]7 u5 O9 h7 r
}
+ @& Z# d8 {0 l4 S9 w: ScaTCh (Exception e) * Z- V, e; N" S. G
{ - i+ P7 d5 t* f; ~0 D* m: ]
return myInnovator.newError(e.Message); 2 W/ U6 s$ G7 y, V7 {, d. m
} 7 D' g% b1 u) w/ B
return myInnovator.newResult("ok"); ! V! x4 i+ n5 c6 G2 H3 F q
2 ? L4 P7 q0 T' @, R1 l/ x |
|