Ejemplo n.º 1
0
        private void chkCollect_Click(object sender, RoutedEventArgs e)
        {
            var            btn = sender as Button;
            CollectLogInfo mi  = btn.DataContext as CollectLogInfo;

            mi.IsChecked = !mi.IsChecked;
            UpdateCollectCheckAll();
        }
Ejemplo n.º 2
0
        public void Insert(CollectLogInfo logInfo)
        {
            IDataParameter[] parms = null;

            var sqlInsert = BaiRongDataProvider.TableStructureDao.GetInsertSqlString(logInfo.ToNameValueCollection(), ConnectionString, TableName, out parms);



            ExecuteNonQuery(sqlInsert, parms);
        }
Ejemplo n.º 3
0
        public void Insert(CollectLogInfo logInfo)
        {
            IDataParameter[] parms = null;

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



            ExecuteNonQuery(SQL_INSERT, parms);
        }
Ejemplo n.º 4
0
        public static void Vote(int publishmentSystemID, int collectID, int itemID, string ipAddress, string cookieSN, string wxOpenID, string userName)
        {
            DataProviderWx.CollectDao.AddUserCount(collectID);
            DataProviderWx.CollectItemDao.AddVoteNum(collectID, itemID);

            var logInfo = new CollectLogInfo {
                Id = 0, PublishmentSystemId = publishmentSystemID, CollectId = collectID, ItemId = itemID, IpAddress = ipAddress, CookieSn = cookieSN, WxOpenId = wxOpenID, UserName = userName, AddDate = DateTime.Now
            };

            DataProviderWx.CollectLogDao.Insert(logInfo);
        }
Ejemplo n.º 5
0
        private void AnalyzeCollectLogUpload(string value)
        {
            CollectLogs collectLogs = XmlUnityConvert.XmlDeserialize <CollectLogs>(value);

            if (collectLogs != null && collectLogs.CollectLogList != null)
            {
                foreach (var item in collectLogs.CollectLogList)
                {
                    CollectLogInfo collectInfo = ManageViewModel.CollectLogs.Find(p => p.LogID.Equals(item.LogID));
                    if (collectInfo != null)
                    {
                        collectInfo.UpLoadState = item.UpLoadState;
                    }
                }
            }
        }
Ejemplo n.º 6
0
        public List <CollectLogInfo> GetCollectLogInfoList(int publishmentSystemId, int collectId, int collectItemId)
        {
            var list = new List <CollectLogInfo>();

            string sqlWhere =
                $"WHERE {CollectLogAttribute.PublishmentSystemId} = {publishmentSystemId} AND {CollectLogAttribute.CollectId} = {collectId} AND {CollectLogAttribute.ItemId} = {collectItemId}";
            var sqlSelect = BaiRongDataProvider.TableStructureDao.GetSelectSqlString(ConnectionString, TableName, 0, SqlUtils.Asterisk, sqlWhere, null);

            using (var rdr = ExecuteReader(sqlSelect))
            {
                while (rdr.Read())
                {
                    var logInfo = new CollectLogInfo(rdr);
                    list.Add(logInfo);
                }
                rdr.Close();
            }

            return(list);
        }
Ejemplo n.º 7
0
        public List <CollectLogInfo> GetCollectLogInfoList(int publishmentSystemID, int collectID, int collectItemID)
        {
            var list = new List <CollectLogInfo>();

            string SQL_WHERE =
                $"WHERE {CollectLogAttribute.PublishmentSystemID} = {publishmentSystemID} AND {CollectLogAttribute.CollectID} = {collectID} AND {CollectLogAttribute.ItemID} = {collectItemID}";
            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 logInfo = new CollectLogInfo(rdr);
                    list.Add(logInfo);
                }
                rdr.Close();
            }

            return(list);
        }
Ejemplo n.º 8
0
        void rptContents_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var logInfo = new CollectLogInfo(e.Item.DataItem);

                var ltlItemIndex = e.Item.FindControl("ltlItemIndex") as Literal;
                var ltlItemId    = e.Item.FindControl("ltlItemID") 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();

                if (_idTitleMap.ContainsKey(logInfo.ItemId))
                {
                    ltlItemId.Text = _idTitleMap[logInfo.ItemId];
                }

                ltlIpAddress.Text = logInfo.IpAddress;
                ltlAddDate.Text   = DateUtils.GetDateAndTimeString(logInfo.AddDate);
            }
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 解析采集站日志
        /// </summary>
        /// <param name="value"></param>
        private void AnalyzeCollectLogsDetail(string value)
        {
            CollectLogs collectLogs = XmlUnityConvert.XmlDeserialize <CollectLogs>(value);

            if (collectLogs != null && collectLogs.CollectLogList != null)
            {
                foreach (var item in collectLogs.CollectLogList)
                {
                    CollectLogInfo collectInfo = ManageViewModel.CollectLogs.Find(p => p.LogID.Equals(item.LogID));
                    if (collectInfo == null)
                    {
                        // 添加
                        ManageViewModel.CollectLogs.AddItem(item);
                        item.SequenceNum = ManageViewModel.CollectLogs.Count;
                        UpdateDetailCount(QueryType.CollectOperateLog);
                    }
                    else
                    {
                        // 更新
                        item.ValueCloneToObject(collectInfo);
                    }
                }
            }
        }