|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
Technique
. v T! i H/ _3 IOn the client side use the vault control to write to a text file. $ [3 {( j" K# m9 Q+ a
JavaScript
+ H1 J5 E! B! N: U- c9 ewith (top.aras.vault)
: `% v# C& q' r{ * |7 m1 G7 r6 `" g) Z6 B
fileCreate(filePath);
: i* P4 z3 ~$ f% o8 p' f1 k fileOpenAppend(filePath);
3 w$ z% W" ], f' |" {, _! m6 K fileWriteLine('<AML><Item type="MyItemType"/></AML>');
5 ~9 j* J& F/ v8 L8 {6 h* e fileClose(); & g4 h3 m z, O9 b+ T0 w
} ) [% m+ c3 c: n9 S5 F
Technique
5 f2 a9 T5 }8 j) WOn the server side use the File and StreamWriter namespaces to write to a text file. $ g$ M9 X7 x' q7 M
C#
- v2 n- ^4 j/ v+ l( @8 k( W4 ?Innovator myInnovator = this.newInnovator();
# ^( q0 V- r/ e$ B# U; p3 G- G 0 u; q% R/ w+ Q; ^6 n" ^4 R: e
// Save the results to a file. 4 C/ m# Q. q0 [" ?( H9 i! R0 g4 f3 O
string path = myInnovator.MapPath("temp/yoyo.txt");
. w7 l4 p9 [* R( v/ stry 4 z: D3 `' e E8 K/ b
{
( O" O! P- C/ }$ z7 `& c# D if (File.Exists(path)) File.Delete(path); # V ?8 c: x# K$ d) c
StreamWriter sw = File.CreateText(path);
/ a6 C: R) B J sw.Write(this.dom.InnerXml); 1 r9 y) i- n; H3 w
sw.Close(); - _- l3 {) M" t$ l
}
+ T) [1 p* d7 P2 |' i, NcaTCh (Exception e)
# _0 Z2 K! _1 U) B/ a8 o$ q{ * Y# j% _, t. n/ H7 S7 Y4 Z
return myInnovator.newError(e.Message); 6 l: [$ P2 R8 V# M2 I; e
} ) @* W; h" Q7 }& e$ K# I, K
return myInnovator.newResult("ok"); ! j3 q9 A1 N, }) O7 y# k+ p
* s' j" d+ e3 q) P% @
|
|