public string enabledMail(int uid) { string _sql = MString.format(@" if not exists(select * from sysobjects where name='{0}') CREATE TABLE [dbo].[{0}]( [id] [bigint] IDENTITY(1,1) NOT NULL PRIMARY KEY, [nodeName] [nvarchar](300) COLLATE Chinese_PRC_CI_AS DEFAULT (''), [pid] [bigint] DEFAULT (0), [depth] [int] DEFAULT (0), [parentPath] [varchar](200) DEFAULT (','), [sons] [int] DEFAULT (0), [treeOrder] [int] DEFAULT (0), [owners] [varchar](2000) DEFAULT (','), [ifRead] [bigint] DEFAULT (0), [ifAttach] [bigint] DEFAULT (0), [state] [int] DEFAULT (0), [type] [int] DEFAULT (0), [link] [varchar](200) DEFAULT (','), [content] [nvarchar](3800) COLLATE Chinese_PRC_CI_AS DEFAULT (''), [delFlag] [bit] DEFAULT ((0)), [cTime] [datetime] DEFAULT (getdate()), [mTime] [datetime] DEFAULT (getdate()), [cPerson] [bigint] DEFAULT (0), [mPerson] [bigint] DEFAULT (0) ) ON [PRIMARY] insert into {0} (nodeName) values ('我的文件夹'); ", T_PREFIX + uid); return(api.execQuery(_sql)); }
public string tableSelect(DBHelper dhb, string t, string k, string c, string dt) { string sql = "select " + k + " from " + t + " where " + c; try { BaseApi ba = new BaseApi(dhb, "$", "^", "@&@", dt); return(ba.execQuery(sql)); } catch (Exception e) { return(Native.getErrorMsg(e.Message)); } }
public string tableUpdate(DBHelper dhb, string t, string u, string c) { string sql = "update " + t + " set " + u + " where " + c; try { BaseApi ba = new BaseApi(dhb); return(ba.execQuery(sql)); } catch (Exception e) { return(Native.getErrorMsg(e.Message)); } }
public string tableDel(DBHelper dbh, string t, string c) { string sql = "delete " + t + " where " + c; try { BaseApi ba = new BaseApi(dbh); return(ba.execQuery(sql)); } catch (Exception e) { return(Native.getErrorMsg(e.Message)); } }
public string getJsonStr() { return(api.execQuery("select wfJson from {0} where id={1};", R.Table.WF_INDEX, indexID)); }
/// <summary> /// getCurrStateNode: 得到当前状态的节点 /// </summary> /// <param name="_keyFields">字段</param> /// <returns></returns> public string getCurrStateNode(string _keyFields) { return(api.execQuery("select {0} from {1} where state=1 and appId={2} and oid={3};", _keyFields, R.Table.WF_INSTANCE, ID, wfIndex.getIndexID())); }