private void LoadData(string strType) { if (strType == "1") { string strID = Request.QueryString["value"];//操作ID zlzw.BLL.GeneralActivityBLL generalActivityBLL = new zlzw.BLL.GeneralActivityBLL(); zlzw.Model.GeneralActivityModel generalActivityModel = generalActivityBLL.GetModel(int.Parse(Get_ID(generalActivityBLL, strID))); labCreateUserName.Text = generalActivityModel.CreateUserName;//创建人姓名 txbActivityTitle.Text = generalActivityModel.ActivityTitle;//招聘会标题 txbActivityAddress.Text = generalActivityModel.ActivityAddress;//招聘会举行地点 FCKeditor1.Value = generalActivityModel.ActivityDesc;//招聘会简介 labCreateUserName.Text = generalActivityModel.CreateUserName;//创建人姓名 if(generalActivityModel.SpecialType == 0) { ckbIsDefaultShow.Checked = false; } else { ckbIsDefaultShow.Checked = true; } ViewState["PublishDate"] = generalActivityModel.PublishDate.ToString(); ViewState["ActivityGuid"] = generalActivityModel.ActivityGuid.ToString(); ToolbarText2.Text = "编辑一条招聘会信息"; } else { labCreateUserName.Text = Get_UserName(Request.Cookies["UserID"].Value); } btnClose.OnClientClick = ActiveWindow.GetConfirmHideReference(); }
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(); }
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(); }
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(); }
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 btnSaveRefresh_Click(object sender, EventArgs e) { if (Request.QueryString["Type"] == "1") { //编辑保存 zlzw.Model.GeneralActivityModel generalActivityModel = new zlzw.Model.GeneralActivityModel(); generalActivityModel.ActivityTitle = txbActivityTitle.Text;//招聘会标题 generalActivityModel.ActivityAddress = txbActivityAddress.Text;//招聘会举行地点 generalActivityModel.ActivityDesc = FCKeditor1.Value;//招聘会简介 generalActivityModel.PublishDate = DateTime.Parse(ViewState["PublishDate"].ToString()); generalActivityModel.ActivityGuid = new Guid(ViewState["ActivityGuid"].ToString()); if (ckbIsDefaultShow.Checked) { generalActivityModel.SpecialType = 1; } else { generalActivityModel.SpecialType = 0; } generalActivityModel.CanUsable = 1; zlzw.BLL.GeneralActivityBLL generalActivityBLL = new zlzw.BLL.GeneralActivityBLL(); generalActivityModel.ActivityID = int.Parse(Get_ID(generalActivityBLL, Request.QueryString["value"])); generalActivityBLL.Update(generalActivityModel); } else { //添加保存 zlzw.Model.GeneralActivityModel generalActivityModel = new zlzw.Model.GeneralActivityModel(); generalActivityModel.ActivityTitle = txbActivityTitle.Text;//招聘会标题 generalActivityModel.ActivityAddress = txbActivityAddress.Text;//招聘会举行地点 generalActivityModel.ActivityDesc = FCKeditor1.Value;//招聘会简介 generalActivityModel.CreateUserKey = Request.Cookies["UserID"].Value;//创建者GUID generalActivityModel.CreateUserName = Get_UserName(Request.Cookies["UserID"].Value);//创建者姓名 generalActivityModel.CanUsable = 1; if (ckbIsDefaultShow.Checked) { generalActivityModel.SpecialType = 1; } else { generalActivityModel.SpecialType = 0; } generalActivityModel.PublishDate = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss")); zlzw.BLL.GeneralActivityBLL generalActivityBLL = new zlzw.BLL.GeneralActivityBLL(); generalActivityBLL.Add(generalActivityModel); } // 2. Close this window and Refresh parent window PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); }
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; } }