Example #1
0
        private void bind_dgv(string valuesStr)
        {
            string strWhere = "channel_id = 12 and isStart= 0 ";

            if (!string.IsNullOrEmpty(valuesStr))
            {
                strWhere += " and title like '%" + valuesStr + "%'";
            }
            BLL.dt_article          bll       = new BLL.dt_article();
            List <Model.dt_article> listModel = new List <Model.dt_article>();

            listModel = bll.GetModelList(strWhere);
            this.dataGridView1.DataSource = listModel;
        }
Example #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            BLL.dt_article   bll_a   = new BLL.dt_article();
            Model.dt_article model_a = bll_a.GetModel(activeID);
            model_a.isStart = 1;
            bll_a.Update(model_a);
            List <Model.dt_active_user> tempList = listActive_user.Where(x => x.joinDate != null).ToList();

            BLL.dt_users bll_u = new BLL.dt_users();
            foreach (var item in tempList)
            {
                Model.dt_users user = bll_u.GetModel(item.UserId);
                user.point += sourceActive;
                bll_u.Update(user);
            }
            this.Close();
        }