private int Get_ParticipatingCompaniesListRecordCount()
        {
            zlzw.BLL.ParticipatingCompaniesListBLL participatingCompaniesListBLL = new zlzw.BLL.ParticipatingCompaniesListBLL();
            System.Data.DataTable dt = participatingCompaniesListBLL.GetList("IsEnable=1 and IsShow=1").Tables[0];

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

            grid1.DataSource = dt;
            grid1.DataBind();
        }
 private void Load_ActivityInfo(string strActivityID)
 {
     zlzw.BLL.ParticipatingCompaniesListBLL participatingCompaniesListBLL = new zlzw.BLL.ParticipatingCompaniesListBLL();
     System.Data.DataTable dt = participatingCompaniesListBLL.GetList("ParticipatingCompaniesGUID='" + strActivityID + "'").Tables[0];
     string strTitle = Get_EnterpriseName(dt.Rows[0]["EnterpriseGuid"].ToString());//企业名称;
     labNavigate.Text = "招聘会参加企业-"+strTitle;//企业名称
     labTitle.Text = strTitle;//招聘会标题
     titleName.Text = strTitle;//招聘会标题
     labDateTime.Text = Set_DateFormat(dt.Rows[0]["PublishDate"].ToString());//发布日期
     labContent.Text = dt.Rows[0]["ParticipatingCompaniesContent"].ToString();//内容
 }
 /// <summary>
 /// 获取总页数
 /// </summary>
 /// <returns></returns>
 private int Get_ParticipatingCompaniesListBLLTotalCount()
 {
     zlzw.BLL.ParticipatingCompaniesListBLL participatingCompaniesListBLL = new zlzw.BLL.ParticipatingCompaniesListBLL();
     DataTable dt = participatingCompaniesListBLL.GetList("IsEnable=1").Tables[0];
     if (dt.Rows.Count > 0)
     {
         return dt.Rows.Count;
     }
     else
     {
         return 0;
     }
 }
 private void Load_ParticipatingCompaniesList()
 {
     //int nPageIndex = AspNetPager1.CurrentPageIndex;
     //int nPageSize = AspNetPager1.PageSize = 10;
     zlzw.BLL.ParticipatingCompaniesListBLL participatingCompaniesListBLL = new zlzw.BLL.ParticipatingCompaniesListBLL();
     //System.Data.DataTable dt = participatingCompaniesListBLL.GetList(nPageSize, nPageIndex, "*", "PublishDate", 0, "desc", "IsEnable=1 and IsShow=1").Tables[0];
     System.Data.DataTable dt = participatingCompaniesListBLL.GetList(1, "IsEnable=1 and IsShow=1", "PublishDate desc").Tables[0];
     if (dt.Rows.Count > 0)
     {
         labContent.Text = dt.Rows[0]["ParticipatingCompaniesContent"].ToString();
     }
     else
     {
         labContent.Text = "";
     }
     //Repeater1.DataSource = dt;
     //Repeater1.DataBind();
 }
 private void LoadData(string strType)
 {
     if (strType == "1")
     {
         string strID = Request.QueryString["value"];//操作ID
         zlzw.BLL.ParticipatingCompaniesListBLL participatingCompaniesListBLL = new zlzw.BLL.ParticipatingCompaniesListBLL();
         zlzw.Model.ParticipatingCompaniesListModel participatingCompaniesListModel = participatingCompaniesListBLL.GetModel(int.Parse(Get_ID(participatingCompaniesListBLL, strID)));
         //drpEnterpriseGuid.SelectedValue = participatingCompaniesListModel.ParticipatingCompaniesGUID.ToString();//所属企业
         txbParticipatingCompaniesContent.Text = participatingCompaniesListModel.ParticipatingCompaniesContent;//发布内容
         //if (participatingCompaniesListModel.IsShow == 1)
         //{
         //    ckbIsShow.Checked = true;
         //}
         //else
         //{
         //    ckbIsShow.Checked = false;
         //}
         ViewState["PublishDate"] = participatingCompaniesListModel.PublishDate.ToString();
         ViewState["ParticipatingCompaniesGUID"] = participatingCompaniesListModel.ParticipatingCompaniesGUID.ToString();
         ToolbarText2.Text = "编辑一条企业参会信息";
     }
     btnClose.OnClientClick = ActiveWindow.GetConfirmHideReference();
 }
        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.ParticipatingCompaniesListBLL participatingCompaniesListBLL = new zlzw.BLL.ParticipatingCompaniesListBLL();
                DataTable dt = participatingCompaniesListBLL.GetList("ParticipatingCompaniesGUID='" + strSelectID + "'").Tables[0];
                zlzw.Model.ParticipatingCompaniesListModel participatingCompaniesListModel = participatingCompaniesListBLL.GetModel(int.Parse(dt.Rows[0]["ParticipatingCompaniesID"].ToString()));
                participatingCompaniesListModel.IsEnable = 0;
                participatingCompaniesListBLL.Update(participatingCompaniesListModel);
                ParticipatingCompaniesListBLL_BindGrid();

                #endregion
            }
            else
            {
                return;
            }
        }
        protected void btnSaveRefresh_Click(object sender, EventArgs e)
        {
            if (Request.QueryString["Type"] == "1")
            {
                //编辑保存
                zlzw.Model.ParticipatingCompaniesListModel participatingCompaniesListModel = new zlzw.Model.ParticipatingCompaniesListModel();
                //participatingCompaniesListModel.EnterpriseGuid = new Guid(drpEnterpriseGuid.SelectedValue);
                participatingCompaniesListModel.ParticipatingCompaniesContent = txbParticipatingCompaniesContent.Text;
                //if(ckbIsShow.Checked)
                //{
                    participatingCompaniesListModel.IsShow = 1;
                //}
                //else
                //{
                //    participatingCompaniesListModel.IsShow = 0;
                //}
                participatingCompaniesListModel.IsEnable = 1;
                participatingCompaniesListModel.PublishDate = DateTime.Parse(ViewState["PublishDate"].ToString());
                participatingCompaniesListModel.ParticipatingCompaniesGUID = new Guid(ViewState["ParticipatingCompaniesGUID"].ToString());
                zlzw.BLL.ParticipatingCompaniesListBLL participatingCompaniesListBLL = new zlzw.BLL.ParticipatingCompaniesListBLL();
                participatingCompaniesListModel.ParticipatingCompaniesID = int.Parse(Get_ID(participatingCompaniesListBLL, Request.QueryString["value"]));

                participatingCompaniesListBLL.Update(participatingCompaniesListModel);
            }
            else
            {
                //添加保存

                zlzw.Model.ParticipatingCompaniesListModel participatingCompaniesListModel = new zlzw.Model.ParticipatingCompaniesListModel();
                //participatingCompaniesListModel.EnterpriseGuid = new Guid(drpEnterpriseGuid.SelectedValue);
                participatingCompaniesListModel.ParticipatingCompaniesContent = txbParticipatingCompaniesContent.Text;
                //if (ckbIsShow.Checked)
                //{
                    participatingCompaniesListModel.IsShow = 1;
                //}
                //else
                //{
                    //participatingCompaniesListModel.IsShow = 0;
                //}
                participatingCompaniesListModel.IsEnable = 1;
                participatingCompaniesListModel.PublishDate = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"));
                zlzw.BLL.ParticipatingCompaniesListBLL participatingCompaniesListBLL = new zlzw.BLL.ParticipatingCompaniesListBLL();
                participatingCompaniesListBLL.Add(participatingCompaniesListModel);
            }

            // 2. Close this window and Refresh parent window
            PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
        }
Ejemplo n.º 9
0
 private void Load_ParticipatingCompaniesList()
 {
     zlzw.BLL.ParticipatingCompaniesListBLL participatingCompaniesListBLL = new zlzw.BLL.ParticipatingCompaniesListBLL();
     DataTable dt = participatingCompaniesListBLL.GetList("IsEnable=1 and IsShow=1 order by PublishDate desc").Tables[0];
     if (dt.Rows.Count > 0)
     {
         labParticipatingCompaniesList.Text = dt.Rows[0]["ParticipatingCompaniesContent"].ToString();
     }
     //Repeater3.DataSource = dt;
     //Repeater3.DataBind();
 }