NC 5:
Get the data source name based on the data source encoding
Import Hz.bs.sm.login.AccountXMLUtil;
DnsName = Accountxmlutil.finddsnamebyaccountcode (AccountCode);
Set the system default data source name
Invocationinfoproxy.getinstance (). Setuserdatasource (DnsName);
/**
* Add a code block for default field values
* If you need this code, please release the comment
Billfield filedef = Billfield.getinstance ();
String Billtype = Getuicontrol (). Getbilltype ();
String Pkcorp = Getenvironment (). Getcorporation (). GetPrimaryKey ();
/**
* Add a code block for default field values
* If you need this code, please release the comment
Billfield filedef = Billfield.getinstance ();
String Billtype = Getuicontrol (). Getbilltype ();
String Pkcorp = Getenvironment (). Getcorporation (). GetPrimaryKey ();
string[] Itemkeys = new string[]{
Filedef.getfield_corp (),
Filedef.getfield_operator (),
Filedef.getfield_billtype (),
Filedef.getfield_billstatus ()
};
Object[] values = new object[]{
Pkcorp,
Getenvironment (). GetUser (). GetPrimaryKey (),
Billtype,
New Integer (Ibillstatus.free). ToString ()
};
for (int i = 0; i < itemkeys.length; i++) {
Billitem item = NULL;
item = Getbillcardpanel (). Getheaditem (Itemkeys[i]);
if (item = = NULL)
item = Getbillcardpanel (). Gettailitem (Itemkeys[i]);
if (item! = NULL)
Item.setvalue (Values[i]);
}
*/
String Voperatorid = Clientenvironment.getinstance (). GetUser ()
. GetPrimaryKey ();
((Clientui) Getbillui ()). Getbillcardpanel (). Settailitem ("Vbillmaker",
Voperatorid);
//
string UserID = (String) ((Clientui) Getbillui ())
. Getbillcardpanel (). Getheadtailitem ("Vbillmaker"). Getvalueobject ();
//
((Clientui) Getbillui ()). Getbillcardpanel (). Setheaditem ("Dbilldate",
New Ufdate ());
Nc6:
Add by XMS May 11, 2015 17:00:24
String Wherestr=null;
String isrole= "N"; Determine if it is included in the global claims role that can be viewed
String pk_role=sysinitquery.getparastring ("GLOBLE00000000000000", "ER15");
String ckauthority =sysinitquery.getparastring ("GLOBLE00000000000000", "ER16");
Iusermanagequery iusermanagerquery= nclocator.getinstance (). lookup (Iusermanagequery.class);
Uservo[] Users=iusermanagerquery.queryuserbyrole (Pk_role, Pk_group);
for (Uservo user:users) {
if (User.getprimarykey (). Equals (Loginuser)) {
Isrole= "Y";
Break
}
}
Add by XMS May 11, 2015 17:00:43 end