/// <summary> /// 根据要素ID修改要素信息 /// </summary> /// <param name="element"></param> /// <param name="dt">最后修改时间</param> public void UpdateElementByEID(Element element, DateTime dt) { string sql = "p_要素目录修改_core"; OracleDataAccess oracleDataAccess = new OracleDataAccess(SiteConfig.OracleConn); OracleParameter[] oracleParameters = { new OracleParameter("v_要素id", OracleDbType.Varchar2, element.EID, ParameterDirection.Input), new OracleParameter("v_资源id", OracleDbType.Varchar2, element.RID, ParameterDirection.Input), new OracleParameter("v_要素名称", OracleDbType.Varchar2, element.Name, ParameterDirection.Input), new OracleParameter("v_要素类型", OracleDbType.Varchar2, element.Type, ParameterDirection.Input), new OracleParameter("v_单位", OracleDbType.Varchar2, element.Unit, ParameterDirection.Input), new OracleParameter("v_备注", OracleDbType.Varchar2, element.Note, ParameterDirection.Input), new OracleParameter("v_最后修改人", OracleDbType.Varchar2, element.LastModify, ParameterDirection.Input), new OracleParameter("v_最后修改时间", OracleDbType.Date, dt, ParameterDirection.Input), new OracleParameter("v_长度", OracleDbType.Long, element.Length, ParameterDirection.Input), new OracleParameter("v_精度", OracleDbType.Long, element.Precision, ParameterDirection.Input), new OracleParameter("v_默认值", OracleDbType.Varchar2, element.Defaulta, ParameterDirection.Input), new OracleParameter("v_分类id", OracleDbType.Varchar2, element.CID, ParameterDirection.Input), new OracleParameter("v_是否必填", OracleDbType.Int32, element.IFRequired, ParameterDirection.Input), new OracleParameter("v_选项类型", OracleDbType.Varchar2, element.OptionType, ParameterDirection.Input), new OracleParameter("v_序号", OracleDbType.Varchar2, element.Numbera, ParameterDirection.Input), new OracleParameter("v_值域资源id", OracleDbType.Varchar2, element.DRID, ParameterDirection.Input), new OracleParameter("v_是否展示主目录", OracleDbType.Int32, element.IFZSZML, ParameterDirection.Input), new OracleParameter("v_名称是否展示", OracleDbType.Int32, element.IFZSMC, ParameterDirection.Input), new OracleParameter("v_编码目录id", OracleDbType.Varchar2, element.CDID, ParameterDirection.Input), new OracleParameter("v_要素分类", OracleDbType.Varchar2, element.ElementClassify, ParameterDirection.Input) }; oracleDataAccess.ExecuteProcdure(sql, oracleParameters); }
/// <summary> /// 根据主体权限ID同步人员权限 /// </summary> /// <param name="MAID">主体权限ID</param> public void CreatePersonnelAuthority(string MAID) { string sql = "p_人员权限同步_core"; OracleDataAccess oracleDataAccess = new OracleDataAccess(SiteConfig.OracleConn); OracleParameter[] oracleParameters = { new OracleParameter("主体权限id_In", OracleDbType.Varchar2, MAID, ParameterDirection.Input) }; oracleDataAccess.ExecuteProcdure(sql, oracleParameters); }
/// <summary> /// 角色权限管理页面新增主体权限 /// </summary> /// <param name="mainAuthority">主体权限实体类</param> /// <param name="dt">最后修改时间</param> /// <param name="uid">主体权限ID</param> public string CreateMainAuthorities(MainAuthority mainAuthority, DateTime dt) { string sql = "p_主体权限_core"; OracleDataAccess oracleDataAccess = new OracleDataAccess(SiteConfig.OracleConn); OracleParameter[] oracleParameters = { new OracleParameter("主体权限id_In", OracleDbType.Varchar2, mainAuthority.AID, ParameterDirection.Input), new OracleParameter("角色id_In", OracleDbType.Varchar2, mainAuthority.RoleID, ParameterDirection.Input), new OracleParameter("主体id_In", OracleDbType.Varchar2, mainAuthority.MID, ParameterDirection.Input), new OracleParameter("主体名称_In", OracleDbType.Varchar2, mainAuthority.MainName, ParameterDirection.Input), new OracleParameter("权限类型_In", OracleDbType.Varchar2, mainAuthority.AuthorityType, ParameterDirection.Input), new OracleParameter("最后修改人_In", OracleDbType.Varchar2, mainAuthority.LastModify, ParameterDirection.Input), new OracleParameter("最后修改时间_In", OracleDbType.Date, dt, ParameterDirection.Input) }; oracleDataAccess.ExecuteProcdure(sql, oracleParameters); return("OK"); }
/// <summary> /// 新增角色用户 /// </summary> /// <param name="roleUesr">角色用户实体</param> /// <param name="dt">时间</param> /// <returns></returns> public string CreateRoleUser(RoleUesr roleUesr, DateTime dt) { string sql = "p_角色用户_core"; OracleDataAccess oracleDataAccess = new OracleDataAccess(SiteConfig.OracleConn); OracleParameter[] oracleParameters = { new OracleParameter("角色用户id_In", OracleDbType.Varchar2, roleUesr.RUID, ParameterDirection.Input), new OracleParameter("角色id_In", OracleDbType.Varchar2, roleUesr.RID, ParameterDirection.Input), new OracleParameter("用户id_In", OracleDbType.Varchar2, roleUesr.UserID, ParameterDirection.Input), new OracleParameter("最后修改人_In", OracleDbType.Varchar2, roleUesr.LastModify, ParameterDirection.Input), new OracleParameter("最后修改时间_In", OracleDbType.Date, dt, ParameterDirection.Input), new OracleParameter("用户名_In", OracleDbType.Varchar2, roleUesr.UserName, ParameterDirection.Input), new OracleParameter("编码_In", OracleDbType.Varchar2, roleUesr.Code, ParameterDirection.Input), new OracleParameter("组织机构_In", OracleDbType.Varchar2, roleUesr.Organization, ParameterDirection.Input), new OracleParameter("邮箱地址_In", OracleDbType.Varchar2, roleUesr.EmailAddress, ParameterDirection.Input) }; oracleDataAccess.ExecuteProcdure(sql, oracleParameters); return("OK"); }
public object FunctionTest(string type) { string sql = "p_test_core"; OracleDataAccess oracleDataAccess = new OracleDataAccess(SiteConfig.OracleConn); OracleParameter[] oracleParameters = { new OracleParameter("Type_in", OracleDbType.Varchar2, type, ParameterDirection.Input), new OracleParameter("Numbera_out", OracleDbType.RefCursor, "", ParameterDirection.Output) }; /*object numbera = oracleDataAccess.ExecuteProcdure(sql, oracleParameters); * return numbera;*/ Dictionary <string, object> dic = oracleDataAccess.ExecuteProcdure(sql, oracleParameters); if (dic.ContainsKey("Numbera_out")) { return(ModelConvert.DataTableToIList <Test>(dic["Numbera_out"] as DataTable).ToList()); } else { return(null); } }