/// <summary>
        /// 返回当前项目当前材料类别的预估历史
        /// </summary>
        /// <param name="pid"></param>
        /// <param name="projectstr"></param>
        /// <param name="creator"></param>
        /// <param name="lastflag"></param>
        /// <returns></returns>
        public static List <PartParameter> FindPartList(string partid, string projectstr, string creator)
        {
            OracleDatabase db  = new OracleDatabase(DataAccess.OIDSConnStr);
            string         sql = "SELECT * FROM mm_part_para_view t WHERE t.last_flag=0 and t.creator='" + creator + "' and t.PARTID=" + partid + " and t.projectid ='" + projectstr + "'";
            DbCommand      cmd = db.GetSqlStringCommand(sql);

            return(EntityBase <PartParameter> .DReaderToEntityList(db.ExecuteReader(cmd)));
        }
Exemple #2
0
        /// <summary>
        /// 查找所有权限信息
        /// </summary>
        /// <returns></returns>
        public static List <Privilege> FindAll()
        {
            Database  db  = DatabaseFactory.CreateDatabase();
            string    sql = "SELECT * FROM PLM.PRIVILEGE_TAB ORDER BY PRIVILEGE_ID";
            DbCommand cmd = db.GetSqlStringCommand(sql);

            return(EntityBase <Privilege> .DReaderToEntityList(db.ExecuteReader(cmd)));
        }
        /// <summary>
        /// 查找所有角色
        /// </summary>
        /// <returns></returns>
        public static List <Role> FindAll()
        {
            OracleDatabase db  = new OracleDatabase(DataAccess.OIDSConnStr);
            string         sql = "SELECT * FROM PLM.ROLE_TAB ORDER BY ROLENAME";
            DbCommand      cmd = db.GetSqlStringCommand(sql);

            return(EntityBase <Role> .DReaderToEntityList(db.ExecuteReader(cmd)));
        }
Exemple #4
0
        public static List <MEOMSS_discipline_new> FindAll(string sql)
        {
            OracleDatabase db = new OracleDatabase(DataAccess.OIDSConnStr);
            //OracleDatabase db = new OracleDatabase(UserSecurity.ConnectionString);
            DbCommand cmd = db.GetSqlStringCommand(sql);

            return(EntityBase <MEOMSS_discipline_new> .DReaderToEntityList(db.ExecuteReader(cmd)));
        }
        /// <summary>
        /// 返回所有第一级类别列表
        /// </summary>
        /// <returns></returns>
        public static List <PartType> Find1STPartType()
        {
            OracleDatabase db  = new OracleDatabase(DataAccess.OIDSConnStr);
            string         sql = "SELECT * FROM plm.MM_PART_TYPE_TAB WHERE PARENT_ID=0";
            DbCommand      cmd = db.GetSqlStringCommand(sql);

            return(EntityBase <PartType> .DReaderToEntityList(db.ExecuteReader(cmd)));
        }
Exemple #6
0
        /// <summary>
        /// 根据ID查找MEO从表信息
        /// </summary>
        /// <param name="sequenceNo"></param>
        /// <returns></returns>

        public static List <MEOsub> FindMEOList(string sequenceNo)
        {
            OracleDatabase db  = new OracleDatabase(DataAccess.OIDSConnStr);
            string         sql = "SELECT * FROM mm_part_REQUIRELINE_tab t WHERE t.deleteflag='N' and t.require_id= " + sequenceNo;
            DbCommand      cmd = db.GetSqlStringCommand(sql);

            return(EntityBase <MEOsub> .DReaderToEntityList(db.ExecuteReader(cmd)));
        }
        public static List <PartBasicInfo> FindSelectResult(string sql)
        {
            //Database db = DatabaseFactory.CreateDatabase("ifsConnection");
            OracleDatabase db  = new OracleDatabase(DataAccess.IFSConnStr);
            DbCommand      cmd = db.GetSqlStringCommand(sql);

            return(EntityBase <PartBasicInfo> .DReaderToEntityList(db.ExecuteReader(cmd)));
        }
        /// <summary>
        /// 根据用户名查找此用户所属的角色
        /// </summary>
        /// <returns></returns>
        public static List <Role> FindAll(string userName)
        {
            OracleDatabase db  = new OracleDatabase(DataAccess.OIDSConnStr);
            string         sql = "SELECT r.* FROM PLM.ROLE_TAB r, PLM.USERINROLE_TAB u WHERE r.ROLENAME=u.ROLENAME AND u.USERNAME=:username";
            DbCommand      cmd = db.GetSqlStringCommand(sql);

            db.AddInParameter(cmd, "username", DbType.String, userName);
            return(EntityBase <Role> .DReaderToEntityList(db.ExecuteReader(cmd)));
        }
        /// <summary>
        /// 根据角色名获得人员名
        /// </summary>
        /// <param name="userName"></param>
        /// <returns></returns>
        public static List <Role> FindName(string roleName)
        {
            OracleDatabase db  = new OracleDatabase(DataAccess.OIDSConnStr);
            string         sql = "SELECT * FROM PLM.userinrole_tab WHERE ROLENAME=:rolename";
            DbCommand      cmd = db.GetSqlStringCommand(sql);

            db.AddInParameter(cmd, "rolename", DbType.String, roleName);
            return(EntityBase <Role> .DReaderToEntityList(db.ExecuteReader(cmd)));
        }
        /// <summary>
        /// 返回所有Project列表
        /// </summary>
        /// <returns></returns>
        public static List <project> FindAll()
        {
            OracleDatabase db = new OracleDatabase(DataAccess.IFSConnStr);
            // Database db = DatabaseFactory.CreateDatabase("ifsConnection");
            string    sql = "SELECT * FROM IFSAPP.PROJECT";
            DbCommand cmd = db.GetSqlStringCommand(sql);

            return(EntityBase <project> .DReaderToEntityList(db.ExecuteReader(cmd)));
        }
        /// <summary>
        /// 根据角色名获得其可以继承的角色集合(已排序其本身及继承自它的角色)
        /// </summary>
        /// <param name="roleName"></param>
        /// <returns></returns>
        public static List <Role> FindAvailableInheritRole(string roleName)
        {
            OracleDatabase db  = new OracleDatabase(DataAccess.OIDSConnStr);
            string         sql = "SELECT * FROM PLM.ROLE_TAB WHERE ROLENAME<>:rolename AND ROLENAME NOT IN (SELECT DISTINCT ROLENAME FROM PLM.ROLEINHERIT_TAB WHERE INHERITNAME=:rolename)";
            DbCommand      cmd = db.GetSqlStringCommand(sql);

            db.AddInParameter(cmd, "rolename", DbType.String, roleName);
            return(EntityBase <Role> .DReaderToEntityList(db.ExecuteReader(cmd)));
        }
Exemple #12
0
        /// <summary>
        /// 返回所有Project列表
        /// </summary>
        /// <returns></returns>
        public static List <ReasonCode> FindAll()
        {
            OracleDatabase db = new OracleDatabase(DataAccess.IFSConnStr);
            // Database db = DatabaseFactory.CreateDatabase("ifsConnection");
            string    sql = "SELECT * FROM IFSAPP.YRS_REQUISITION_REASON_TAB";
            DbCommand cmd = db.GetSqlStringCommand(sql);

            return(EntityBase <ReasonCode> .DReaderToEntityList(db.ExecuteReader(cmd)));
        }
        /// <summary>
        /// 返回所有第2级类别列表
        /// </summary>
        /// <returns></returns>
        public static List <PartType> Find2STPartType(int typeid)
        {
            OracleDatabase db  = new OracleDatabase(DataAccess.OIDSConnStr);
            string         sql = "SELECT * FROM plm.MM_PART_TYPE_TAB WHERE PARENT_ID=:typeid";
            DbCommand      cmd = db.GetSqlStringCommand(sql);

            db.AddInParameter(cmd, "typeid", DbType.Int32, typeid);
            return(EntityBase <PartType> .DReaderToEntityList(db.ExecuteReader(cmd)));
        }
Exemple #14
0
        /// <summary>
        /// 查找所有权限信息
        /// </summary>
        /// <returns></returns>
        public static List <Privilege> FindAll(string cata)
        {
            Database  db  = DatabaseFactory.CreateDatabase();
            string    sql = "SELECT * FROM PLM.PRIVILEGE_TAB WHERE PRIVILEGE_CATA=:cata ORDER BY PRIVILEGE_ID";
            DbCommand cmd = db.GetSqlStringCommand(sql);

            db.AddInParameter(cmd, "cata", DbType.String, cata);
            return(EntityBase <Privilege> .DReaderToEntityList(db.ExecuteReader(cmd)));
        }
        /// <summary>
        /// 返回所有子项目列表
        /// </summary>
        /// <returns></returns>
        public static List <SubProject> FindAll(string id)
        {
            OracleDatabase db = new OracleDatabase(DataAccess.IFSConnStr);
            //Database db = DatabaseFactory.CreateDatabase("ifsConnection");
            string    sql = "SELECT *	FROM IFSAPP.SUB_PROJECT T  WHERE T.PROJECT_ID =:id	 AND T.PARENT_SUB_PROJECT_ID IS  NULL ORDER BY t.sub_project_id";
            DbCommand cmd = db.GetSqlStringCommand(sql);

            db.AddInParameter(cmd, "id", DbType.String, id);
            return(EntityBase <SubProject> .DReaderToEntityList(db.ExecuteReader(cmd)));
        }
Exemple #16
0
        public static List <PartRelative> FindRelativeERPPartList(string stnPartno, string projectId, string Site)
        {
            OracleDatabase db  = new OracleDatabase(DataAccess.OIDSConnStr);
            string         sql = "SELECT * FROM plm.MM_IFS_STA_PART_TAB where STA_PART_NO=:stnPartno and PROJECTID=:proId and SITE=:site";
            DbCommand      cmd = db.GetSqlStringCommand(sql);

            db.AddInParameter(cmd, "stnPartno", DbType.String, stnPartno);
            db.AddInParameter(cmd, "proId", DbType.String, projectId);
            db.AddInParameter(cmd, "site", DbType.String, Site);
            return(EntityBase <PartRelative> .DReaderToEntityList(db.ExecuteReader(cmd)));
        }
        /// <summary>
        /// 返回所有子项目列表
        /// </summary>
        /// <returns></returns>
        public static List <Activity> FindAll(string id, string SubPro)
        {
            //Database db = DatabaseFactory.CreateDatabase("ifsConnection");
            OracleDatabase db  = new OracleDatabase(DataAccess.IFSConnStr);
            string         sql = "SELECT *	FROM IFSAPP.ACTIVITY T  WHERE T.PROJECT_ID =:id	 AND T.sub_project_id=:subPro ORDER BY t.activity_no";
            DbCommand      cmd = db.GetSqlStringCommand(sql);

            db.AddInParameter(cmd, "id", DbType.String, id);
            db.AddInParameter(cmd, "subPro", DbType.String, SubPro);
            return(EntityBase <Activity> .DReaderToEntityList(db.ExecuteReader(cmd)));
        }
        /// <summary>
        /// 返回所有子项目列表
        /// </summary>
        /// <returns></returns>
        public static List <PartBasicInfo> FindAll(string Pid, string ACT_SEQ)
        {
            //Database db = DatabaseFactory.CreateDatabase("ifsConnection");
            OracleDatabase db  = new OracleDatabase(DataAccess.IFSConnStr);
            string         sql = "SELECT PROJECT_ID, ACTIVITY_SEQ, SITE, PART_NO, IFSAPP.PURCHASE_PART_API.GET_DESCRIPTION(SITE, PART_NO) PART_NAME,IFSAPP.INVENTORY_PART_API.GET_UNIT_MEAS(SITE, PART_NO) UNIT, IFSAPP.INVENTORY_PART_API.PART_EXIST(SITE, PART_NO) IS_EXIST,	 ISSUE_FROM_INV, REQUEST_QTY, IFSAPP.PROJ_PROCU_RATION_API.GET_ACCU_RATION_QTY(MATR_SEQ_NO) SUM, REQUIRE_QTY -IFSAPP.PROJ_PROCU_RATION_API.GET_ACCU_RATION_QTY(MATR_SEQ_NO) REST, REQUEST_DATE,	 P_REQUISITION_NO, P_REQ_LINE_NO, P_REQ_RELEASE_NO, INFORMATION, REASON_CODE, IFSAPP.YRS_REQUISITION_REASON_API.GET_DESCRIPTION(REASON_CODE) REASON_DESC, DESIGN_CODE FROM IFSAPP.PROJECT_MISC_PROCUREMENT WHERE PROJECT_ID =:PROID	 AND (ACTIVITY_SEQ =:ACT_SEQ)";
            DbCommand      cmd = db.GetSqlStringCommand(sql);

            db.AddInParameter(cmd, "PROID", DbType.String, Pid);
            db.AddInParameter(cmd, "ACT_SEQ", DbType.String, ACT_SEQ);
            return(EntityBase <PartBasicInfo> .DReaderToEntityList(db.ExecuteReader(cmd)));
        }