示例#1
0
        public List<VipCardTypeOR> selectAllVipCardType()
        {
            string sql = "select * from t_VipCardType";

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

            string sql = @"select bu.* from t_VipCardType bu
            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<VipCardTypeOR> listVipC = new List<VipCardTypeOR>();
            foreach (DataRow dr in dt.Rows)
            {
                VipCardTypeOR obj = new VipCardTypeOR(dr);
                listVipC.Add(obj);
            }
            return listVipC;
        }
示例#3
0
        /// <summary>
        /// 获取插入数据
        /// </summary>
        public string GetInsertSql(VipCardTypeOR vipCardType)
        {
            string sql = @"insert into t_VipCardType (id,name,FirstTime,Description,orgBH)
            values ('@id','@name',@FirstTime,'@Description','@orgBH')";
            sql = sql.Replace("@id", vipCardType.Id);	//
            sql = sql.Replace("@name", vipCardType.Name);	//名称
            sql = sql.Replace("@FirstTime", vipCardType.Firsttime.ToString());	//优先时间
            sql = sql.Replace("@Description", vipCardType.Description);	//描述
            sql = sql.Replace("@orgBH", vipCardType.Orgbh);	//所属机构

            return sql;
        }