Exemplo n.º 1
0
        private int Get_ActivityListRecordCount()
        {
            zlzw.BLL.GeneralActivityBLL generalActivityBLL = new zlzw.BLL.GeneralActivityBLL();
            DataTable dt = generalActivityBLL.GetList("CanUsable=1").Tables[0];

            return dt.Rows.Count;
        }
        private void GeneralActivityList_BindGrid()
        {
            zlzw.BLL.GeneralActivityBLL generalActivityBLL = new zlzw.BLL.GeneralActivityBLL();
            DataTable dt = generalActivityBLL.GetList(grid1.PageSize, grid1.PageIndex + 1, "*", "PublishDate", 0, "desc", "CanUsable=1").Tables[0];

            grid1.DataSource = dt;
            grid1.DataBind();
        }
Exemplo n.º 3
0
        private void Load_NewsList()
        {
            zlzw.BLL.GeneralActivityBLL generalActivityBLL = new zlzw.BLL.GeneralActivityBLL();
            DataTable dt = generalActivityBLL.GetList(4, "CanUsable=1 and SpecialType=1", "PublishDate desc").Tables[0];

            Repeater1.DataSource = dt;
            Repeater1.DataBind();
        }
Exemplo n.º 4
0
        private void Load_ActivityList()
        {
            int nPageIndex = AspNetPager1.CurrentPageIndex;
            int nPageSize = AspNetPager1.PageSize = 15;
            zlzw.BLL.GeneralActivityBLL generalActivityBLL = new zlzw.BLL.GeneralActivityBLL();
            DataTable dt = generalActivityBLL.GetList(nPageSize, nPageIndex, "*", "PublishDate", 0, "desc", "CanUsable=1").Tables[0];

            Repeater1.DataSource = dt;
            Repeater1.DataBind();
        }
Exemplo n.º 5
0
 private void Load_ActivityInfo(string strActivityID)
 {
     zlzw.BLL.GeneralActivityBLL generalActivityBLL = new zlzw.BLL.GeneralActivityBLL();
     DataTable dt = generalActivityBLL.GetList("ActivityGuid='"+ strActivityID +"'").Tables[0];
     string strTitle = dt.Rows[0]["ActivityTitle"].ToString();//招聘会标题;
     labNavigate.Text = strTitle;//招聘会标题
     labTitle.Text = strTitle;//招聘会标题
     titleName.Text = strTitle;//招聘会标题
     labPublishName.Text = dt.Rows[0]["CreateUserName"].ToString();//发布人
     labDateTime.Text = Set_DateFormat(dt.Rows[0]["PublishDate"].ToString());//发布日期
     labContent.Text = dt.Rows[0]["ActivityDesc"].ToString();//内容
 }
 /// <summary>
 /// 获取总页数
 /// </summary>
 /// <returns></returns>
 private int Get_GeneralActivityListTotalCount()
 {
     zlzw.BLL.GeneralActivityBLL generalActivityBLL = new zlzw.BLL.GeneralActivityBLL();
     DataTable dt = generalActivityBLL.GetList("CanUsable=1").Tables[0];
     if (dt.Rows.Count > 0)
     {
         return dt.Rows.Count;
     }
     else
     {
         return 0;
     }
 }
        protected void btnDel_Click(object sender, EventArgs e)
        {
            if (grid1.SelectedRowIndexArray != null && grid1.SelectedRowIndexArray.Length > 0)
            {
                string strSelectID = "0";
                for (int i = 0, count = grid1.SelectedRowIndexArray.Length; i < count; i++)
                {
                    int rowIndex = grid1.SelectedRowIndexArray[i];
                    foreach (object key in grid1.DataKeys[rowIndex])
                    {
                        strSelectID = key.ToString();
                    }
                }
                #region 删除逻辑

                zlzw.BLL.GeneralActivityBLL generalActivityBLL = new zlzw.BLL.GeneralActivityBLL();
                DataTable dt = generalActivityBLL.GetList("ActivityGuid='" + strSelectID + "'").Tables[0];
                zlzw.Model.GeneralActivityModel generalActivityModel = generalActivityBLL.GetModel(int.Parse(dt.Rows[0]["ActivityID"].ToString()));
                generalActivityModel.CanUsable = 0;
                generalActivityBLL.Update(generalActivityModel);
                GeneralActivityList_BindGrid();

                #endregion
            }
            else
            {
                return;
            }
        }