예제 #1
0
        private void btnAddWebLinkUrl_Click(object sender, EventArgs e)
        {
            string            txtWeblink = txtWebLink.Text.Trim();
            List <FriendLink> linkList   = BLL.FriendLink.Instance.GetList(); //BLL.UpdateLink.Instance.GetAll();

            if (linkList.Exists(lk => lk.PUrl == txtWeblink))
            {
                MessageBox.Show("该网址已经存在!");
                return;
            }
            int timespan = XS.Core.XsUtils.ObjectToInt(drpTimeSpanWebLink.SelectedItem, 24);

            if (!string.IsNullOrEmpty(txtWeblink))
            {
                //XS.Core.WebUtils.LoadURLString(txtWeblink);

                Entity.FriendLink md = new FriendLink();
                md.PUrl         = txtWeblink;
                md.LastTestDate = DateTime.Now;
                md.TimeSpan     = timespan;
                md.IsHaveBad    = false;
                BLL.FriendLink.Instance.Add(md);
                BindWebLink();
            }
        }
예제 #2
0
        public FriendLinksReport(string datakey)
        {
            InitializeComponent();

            //   设置行高   20
            ImageList imgList = new ImageList();

            imgList.ImageSize = new Size(1, 20);   //分别是宽和高

            lvReport.View          = View.Details; //只有设置为这个HeaderStyle才有用
            lvReport.HeaderStyle   = ColumnHeaderStyle.Nonclickable;
            lvReport.GridLines     = true;         //显示网格线
            lvReport.FullRowSelect = true;         //选择时选择是行,而不是某列
            lvReport.Columns.Add("页面地址", 200, HorizontalAlignment.Center);
            lvReport.Columns.Add("是否死链", 80, HorizontalAlignment.Center);
            lvReport.Columns.Add("初始百度权重", 100, HorizontalAlignment.Center);
            lvReport.Columns.Add("初始移动权重", 100, HorizontalAlignment.Center);
            //lvReport.Columns.Add("上月BR", 50, HorizontalAlignment.Center);
            //lvReport.Columns.Add("上月PR", 50, HorizontalAlignment.Center);
            lvReport.Columns.Add("当前百度权重", 100, HorizontalAlignment.Center);
            lvReport.Columns.Add("当前移动权重", 100, HorizontalAlignment.Center);

            lvReport.Columns.Add("友链数量", 80, HorizontalAlignment.Center);
            lvReport.Columns.Add("是否有反链", 80, HorizontalAlignment.Center);
            lvReport.Columns.Add("反链文本", 80, HorizontalAlignment.Center);
            lvReport.Columns.Add("是否NoFllow", 80, HorizontalAlignment.Center);
            lvReport.Columns.Add("汇报情况", 250, HorizontalAlignment.Center);
            lvReport.SmallImageList = imgList;                                   //这里设置listView的SmallImageList ,用imgList将其撑大

            model        = BLL.FriendLink.Instance.GetEntity(new Guid(datakey)); //BLL.BadLink.Instance.GetOne(datakey);
            txtInfo.Text = string.Format("检测地址:{0},{1},最后检测时间{2}", model.PUrl, model.IsHaveBad?"发现异常":"正常", model.LastTestDate);

            txtFriendLinkNoCheck.Text = model.NoToCheckUrl;

            BindData();
        }