コード例 #1
0
        /// <summary>
        /// 获取银行卡
        /// </summary>
        /// <returns></returns>
        public static List <UserBanks> GetBanks(string type, string userid, int pageSize, int pageIndex, ref int totalCount, ref int pageCount, string keyword = "")
        {
            string tablename = "UserBanks  a join M_Users b on a.userid=b.userid ";

            string sqlwhere = " 1=1 ";

            if (!string.IsNullOrEmpty(type))
            {
                sqlwhere += " and a.Type in(" + type + ")";
            }
            if (!string.IsNullOrEmpty(userid))
            {
                sqlwhere += " and a.userid='" + userid + "' ";
            }
            if (!string.IsNullOrEmpty(keyword))
            {
                sqlwhere += " and b.LoginName='" + keyword + "' ";
            }
            DataTable        dt   = CommonBusiness.GetPagerData(tablename, "a.*,b.LoginName ", sqlwhere, "a.AutoID ", pageSize, pageIndex, out totalCount, out pageCount);
            List <UserBanks> list = new List <UserBanks>();

            foreach (DataRow dr in dt.Rows)
            {
                UserBanks model = new UserBanks();
                model.FillData(dr);
                list.Add(model);
            }
            return(list);
        }
コード例 #2
0
        public static UserBanks GetBankDetail(int autoid)
        {
            DataTable dt    = UserBanksDAL.BaseProvider.GetBankDetail(autoid);
            UserBanks model = new UserBanks();

            foreach (DataRow dr in dt.Rows)
            {
                model.FillData(dr);
            }
            return(model);
        }