コード例 #1
0
        public List<BussinessRoleONOR> selectRolesONByRoleID(string mRoleID)
        {
            string sql = string.Format("select * from t_BussinessRoleON where BussinessRoleID='{0}'", mRoleID);

            DataTable dt = null;
            try
            {
                dt = dbMySql.ExecuteQuery(sql);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            if (dt == null)
            {
                return null;
            }
            List<BussinessRoleONOR> listBuss = new List<BussinessRoleONOR>();
            foreach (DataRow dr in dt.Rows)
            {
                BussinessRoleONOR obj = new BussinessRoleONOR(dr);
                listBuss.Add(obj);
            }
            return listBuss;
        }
コード例 #2
0
        public List<BussinessRoleONOR> selectBussinessRoleONData(string orgbhWhere)
        {
            if (string.IsNullOrEmpty(orgbhWhere))
                return null;

            string sql = @"select bron.* from t_BussinessRoleON bron
            inner join t_BussinessRole bu on   bron.BussinessRoleID= bu.id
            inner join t_Bank b on b.orgbh= bu.orgbh
             where " + orgbhWhere;
            DataTable dt = null;
            try
            {
                dt = dbMsSql.ExecuteQuery(sql);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            if (dt == null)
                return null;
            List<BussinessRoleONOR> listBuss = new List<BussinessRoleONOR>();
            foreach (DataRow dr in dt.Rows)
            {
                BussinessRoleONOR obj = new BussinessRoleONOR(dr);
                listBuss.Add(obj);
            }
            return listBuss;
        }
コード例 #3
0
        /// <summary>
        /// 获取插入数据
        /// </summary>
        public string GetInsertSql(BussinessRoleONOR bussinessRoleON)
        {
            string sql = @"insert into t_BussinessRoleON (BussinessRoleID,BussinessId,PriorTimes,BackupPriorTimes,IsBackupPrio)
            values ('@BussinessRoleID','@BussinessId',@PriorTimes,@BackupPriorTimes,@IsBackupPrio)";
            sql = sql.Replace("@BussinessRoleID", bussinessRoleON.Bussinessroleid);	//业务角色ID
            sql = sql.Replace("@BussinessId", bussinessRoleON.Bussinessid);	//业务类型
            sql = sql.Replace("@PriorTimes", bussinessRoleON.Priortimes.ToString());	//主队列优先时间
            sql = sql.Replace("@BackupPriorTimes", bussinessRoleON.Backuppriortimes.ToString());	//备用队列优先时间
            sql = sql.Replace("@IsBackupPrio", bussinessRoleON.IsBackupPrio ? "1" : "0");

            return sql;
        }