internal static string InserAttachlst(WFM_ATTACHLST att) { try { string sql = string.Concat(new string[] { "insert into wfm_attachlst (cid, pid, cname, pnode, ptype, ctype, ckind, csort, createdate, createby, isupload) values ('", att.CID, "', '", att.PID, "', '", att.CNAME, "', '", att.PNODE, "', '流程实例', '必选', '文件', 0,sysdate , 'ADMIN', 1)" }); DbHelper.Conn = new OracleConnection(GGK); DbHelper.SetProvider(MyDBType.Oracle); DbHelper.ExecuteNonQuery(DbHelper.Conn, System.Data.CommandType.Text, sql, null); return(att.CID); } catch (Exception ex) { //WriteLog(path, "insertATTACHLST"+ex.Message); throw ex; } return(""); }
private static string GetCID(string slbh, string fileName) { string cid = ImportDAL.GetCID(slbh); if (cid == "") { WFM_ATTACHLST att = new WFM_ATTACHLST(); att.CID = Guid.NewGuid().ToString(); att.CNAME = fileName; att.PID = ImportDAL.GetCID(slbh); att.PNODE = slbh; cid = ImportDAL.InserAttachlst(att); } return(cid); }
internal static string InserAttachlst(WFM_ATTACHLST att) { string sql = "insert into wfm_attachlst (cid, pid, cname, pnode, ptype, ctype, ckind, csort, createdate, createby, isupload) " + "values ('{0}', '{1}', '{2}', '{3}', '流程实例', '必选', '文件', 0,sysdate , 'ADMIN', 0)"; //string.Concat(new string[] sql = string.Format(sql, att.CID, att.PID, att.CNAME, att.PNODE); lock (lockKey) { DbHelper dbHelper = new DbHelper(); dbHelper.Conn = new Oracle.DataAccess.Client.OracleConnection(GGK); dbHelper.SetProvider(MyDBType.Oracle); dbHelper.ExecuteNonQuery(dbHelper.Conn, System.Data.CommandType.Text, sql, null); dbHelper.Conn.Close(); return(att.CID); } }
private static string GetCID(string slbh, string fileName, string fileType, string user, string pid) { string cid = ImportDAL.GetCID(slbh, fileName, fileType); if (cid == "") { WFM_ATTACHLST att = new WFM_ATTACHLST(); att.CID = Guid.NewGuid().ToString(); att.CNAME = fileName; if (fileType == "文件夹") { att.PID = ImportDAL.GetCID(slbh); } else { att.PID = pid; } att.PNODE = slbh; cid = ImportDAL.InserAttachlst(att, fileType, user); } return(cid); }