Beispiel #1
0
        void rptContents_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var contentInfo = new ConferenceContentInfo(e.Item.DataItem);

                var ltlItemIndex = e.Item.FindControl("ltlItemIndex") as Literal;
                var ltlRealName  = e.Item.FindControl("ltlRealName") as Literal;
                var ltlMobile    = e.Item.FindControl("ltlMobile") as Literal;
                var ltlEmail     = e.Item.FindControl("ltlEmail") as Literal;
                var ltlCompany   = e.Item.FindControl("ltlCompany") as Literal;
                var ltlPosition  = e.Item.FindControl("ltlPosition") as Literal;
                var ltlNote      = e.Item.FindControl("ltlNote") as Literal;
                var ltlWXOpenID  = e.Item.FindControl("ltlWXOpenID") as Literal;
                var ltlIPAddress = e.Item.FindControl("ltlIPAddress") as Literal;
                var ltlAddDate   = e.Item.FindControl("ltlAddDate") as Literal;

                ltlItemIndex.Text = (e.Item.ItemIndex + 1).ToString();

                ltlRealName.Text  = contentInfo.RealName;
                ltlMobile.Text    = contentInfo.Mobile;
                ltlEmail.Text     = contentInfo.Email;
                ltlCompany.Text   = contentInfo.Company;
                ltlPosition.Text  = contentInfo.Position;
                ltlNote.Text      = contentInfo.Note;
                ltlWXOpenID.Text  = contentInfo.WXOpenID;
                ltlIPAddress.Text = contentInfo.IPAddress;
                ltlAddDate.Text   = DateUtils.GetDateAndTimeString(contentInfo.AddDate);
            }
        }
Beispiel #2
0
        public void Insert(ConferenceContentInfo contentInfo)
        {
            IDataParameter[] parms = null;

            var SQL_INSERT = BaiRongDataProvider.TableStructureDao.GetInsertSqlString(contentInfo.ToNameValueCollection(), ConnectionString, TABLE_NAME, out parms);


            ExecuteNonQuery(SQL_INSERT, parms);
        }
Beispiel #3
0
        public static void AddContent(int publishmentSystemID, int conferenceID, string realName, string mobile, string email, string company, string position, string note, string ipAddress, string cookieSN, string wxOpenID, string userName)
        {
            DataProviderWx.ConferenceDao.AddUserCount(conferenceID);
            var contentInfo = new ConferenceContentInfo {
                Id = 0, PublishmentSystemId = publishmentSystemID, ConferenceId = conferenceID, IpAddress = ipAddress, CookieSn = cookieSN, WxOpenId = wxOpenID, UserName = userName, RealName = realName, Mobile = mobile, Email = email, Company = company, Position = position, Note = note, AddDate = DateTime.Now
            };

            DataProviderWx.ConferenceContentDao.Insert(contentInfo);
        }
Beispiel #4
0
        public List <ConferenceContentInfo> GetConferenceContentInfoList(int publishmentSystemID, int conferenceID)
        {
            var conferenceContentInfoList = new List <ConferenceContentInfo>();

            string SQL_WHERE =
                $" AND {ConferenceContentAttribute.PublishmentSystemID} = {publishmentSystemID} AND {ConferenceContentAttribute.ConferenceID} = {conferenceID}";

            var SQL_SELECT = BaiRongDataProvider.TableStructureDao.GetSelectSqlString(ConnectionString, TABLE_NAME, 0, SqlUtils.Asterisk, SQL_WHERE, null);

            using (var rdr = ExecuteReader(SQL_SELECT))
            {
                while (rdr.Read())
                {
                    var conferenceContentInfo = new ConferenceContentInfo(rdr);
                    conferenceContentInfoList.Add(conferenceContentInfo);
                }
                rdr.Close();
            }

            return(conferenceContentInfoList);
        }
Beispiel #5
0
        public List <ConferenceContentInfo> GetConferenceContentInfoList(int publishmentSystemId, int conferenceId)
        {
            var conferenceContentInfoList = new List <ConferenceContentInfo>();

            string sqlWhere =
                $" AND {ConferenceContentAttribute.PublishmentSystemId} = {publishmentSystemId} AND {ConferenceContentAttribute.ConferenceId} = {conferenceId}";

            var sqlSelect = BaiRongDataProvider.TableStructureDao.GetSelectSqlString(ConnectionString, TableName, 0, SqlUtils.Asterisk, sqlWhere, null);

            using (var rdr = ExecuteReader(sqlSelect))
            {
                while (rdr.Read())
                {
                    var conferenceContentInfo = new ConferenceContentInfo(rdr);
                    conferenceContentInfoList.Add(conferenceContentInfo);
                }
                rdr.Close();
            }

            return(conferenceContentInfoList);
        }