Beispiel #1
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public ModTS_USER GetModel(string C_ACCOUNT)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select C_ID,C_NAME,C_ACCOUNT,C_PASSWORD,C_EMAIL,C_MOBILE,N_STATUS,N_TYPE,C_DESC,D_LASTLOGINTIME,C_EMP_ID,C_EMP_NAME,D_MOD_DT,C_MOBILE2,C_PHONE,C_SHORTNAME from TS_USER ");
            strSql.Append(" where N_TYPE=3 and  C_ACCOUNT=:C_ACCOUNT  ");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_ACCOUNT", OracleDbType.Varchar2, 50)
            };
            parameters[0].Value = C_ACCOUNT;

            ModTS_USER model = new ModTS_USER();
            DataSet    ds    = DbHelperOra.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Beispiel #2
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public ModTS_ROLE_PCI GetModel(string C_ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select C_ID,C_ROLE_NAME,N_STATUS,C_REMARK,C_EMP_ID,D_MOD_DT from TS_ROLE_PCI ");
            strSql.Append(" where C_ID=:C_ID ");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_ID", OracleDbType.Varchar2, 50)
            };
            parameters[0].Value = C_ID;

            ModTS_ROLE_PCI model = new ModTS_ROLE_PCI();
            DataSet        ds    = DbHelperOra.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }