コード例 #1
0
 private void Load_EnterpriseServiceConten(string strType)
 {
     titleName.Text = Get_EnterpriseServiceName(strType);
     zlzw.BLL.EnterpriseServiceInfoListBLL enterpriseServiceInfoListBLL = new zlzw.BLL.EnterpriseServiceInfoListBLL();
     System.Data.DataTable dt = enterpriseServiceInfoListBLL.GetList("EnterpriseServiceTypeGUID='" + strType + "'").Tables[0];
     labContent.Text = dt.Rows[0]["EnterpriseServiceInfoContent"].ToString();
 }
コード例 #2
0
        private void EnterpriseServiceInfoList_BindGrid()
        {
            zlzw.BLL.EnterpriseServiceInfoListBLL enterpriseServiceInfoListBLL = new zlzw.BLL.EnterpriseServiceInfoListBLL();
            DataTable dt = enterpriseServiceInfoListBLL.GetList(grid1.PageSize, grid1.PageIndex + 1, "*", "PublishDate", 0, "desc", "IsEnable=1").Tables[0];

            grid1.DataSource = dt;
            grid1.DataBind();
        }
コード例 #3
0
 /// <summary>
 /// 获取总页数
 /// </summary>
 /// <returns></returns>
 private int Get_EnterpriseServiceInfoListTotalCount()
 {
     zlzw.BLL.EnterpriseServiceInfoListBLL enterpriseServiceInfoListBLL = new zlzw.BLL.EnterpriseServiceInfoListBLL();
     DataTable dt = enterpriseServiceInfoListBLL.GetList("IsEnable=1").Tables[0];
     if (dt.Rows.Count > 0)
     {
         return dt.Rows.Count;
     }
     else
     {
         return 0;
     }
 }
コード例 #4
0
 private void LoadData(string strType)
 {
     if (strType == "1")
     {
         string strID = Request.QueryString["value"];//操作ID
         zlzw.BLL.EnterpriseServiceInfoListBLL enterpriseServiceInfoListBLL = new zlzw.BLL.EnterpriseServiceInfoListBLL();
         zlzw.Model.EnterpriseServiceInfoListModel enterpriseServiceInfoListModel = enterpriseServiceInfoListBLL.GetModel(int.Parse(Get_ID(enterpriseServiceInfoListBLL, strID)));
         labPublisID.Text = Get_UserName(enterpriseServiceInfoListModel.PublishID.ToString());
         drpEnterpriseServiceTypeGUID.SelectedValue = enterpriseServiceInfoListModel.EnterpriseServiceTypeGUID.ToString();//所属服务类型
         txbEnterpriseServiceInfoTitle.Text = enterpriseServiceInfoListModel.EnterpriseServiceInfoTitle;//服务名称
         txbEnterpriseServiceInfointroduction.Text = enterpriseServiceInfoListModel.EnterpriseServiceInfointroduction;//内容简介
         FCKeditor1.Value = enterpriseServiceInfoListModel.EnterpriseServiceInfoContent;//内容正文;
         
         ViewState["PublishDate"] = enterpriseServiceInfoListModel.PublishDate.ToString();
         ViewState["EnterpriseServiceInfoGUID"] = enterpriseServiceInfoListModel.EnterpriseServiceInfoGUID.ToString();
         ToolbarText2.Text = "编辑一个企业服务内容";
     }
     btnClose.OnClientClick = ActiveWindow.GetConfirmHideReference();
 }
コード例 #5
0
        protected void btnSaveRefresh_Click(object sender, EventArgs e)
        {
            if (Request.QueryString["Type"] == "1")
            {
                //编辑保存
                zlzw.Model.EnterpriseServiceInfoListModel enterpriseServiceInfoListModel = new zlzw.Model.EnterpriseServiceInfoListModel();
                enterpriseServiceInfoListModel.EnterpriseServiceTypeGUID = new Guid(drpEnterpriseServiceTypeGUID.SelectedValue);//所属企业服务类型
                enterpriseServiceInfoListModel.EnterpriseServiceInfoTitle = txbEnterpriseServiceInfoTitle.Text;//企业内名称
                enterpriseServiceInfoListModel.EnterpriseServiceInfointroduction = txbEnterpriseServiceInfointroduction.Text;//内容简介
                enterpriseServiceInfoListModel.EnterpriseServiceInfoContent = FCKeditor1.Value;//内容正文
                enterpriseServiceInfoListModel.IsEnable = 1;
                enterpriseServiceInfoListModel.PublishID = new Guid(Request.Cookies["UserID"].Value);//发布人ID
                enterpriseServiceInfoListModel.PublishDate = DateTime.Parse(ViewState["PublishDate"].ToString());
                enterpriseServiceInfoListModel.EnterpriseServiceInfoGUID = new Guid(ViewState["EnterpriseServiceInfoGUID"].ToString());
                zlzw.BLL.EnterpriseServiceInfoListBLL enterpriseServiceInfoListBLL = new zlzw.BLL.EnterpriseServiceInfoListBLL();
                enterpriseServiceInfoListModel.EnterpriseServiceInfoID = int.Parse(Get_ID(enterpriseServiceInfoListBLL, Request.QueryString["value"]));

                enterpriseServiceInfoListBLL.Update(enterpriseServiceInfoListModel);
            }
            else
            {
                //添加保存

                zlzw.Model.EnterpriseServiceInfoListModel enterpriseServiceInfoListModel = new zlzw.Model.EnterpriseServiceInfoListModel();
                enterpriseServiceInfoListModel.EnterpriseServiceTypeGUID = new Guid(drpEnterpriseServiceTypeGUID.SelectedValue);//所属企业服务类型
                enterpriseServiceInfoListModel.EnterpriseServiceInfoTitle = txbEnterpriseServiceInfoTitle.Text;//企业内名称
                enterpriseServiceInfoListModel.EnterpriseServiceInfointroduction = txbEnterpriseServiceInfointroduction.Text;//内容简介
                enterpriseServiceInfoListModel.EnterpriseServiceInfoContent = FCKeditor1.Value;//内容正文
                enterpriseServiceInfoListModel.IsEnable = 1;
                enterpriseServiceInfoListModel.PublishID = new Guid(Request.Cookies["UserID"].Value);//发布人ID
                enterpriseServiceInfoListModel.PublishDate = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"));
                zlzw.BLL.EnterpriseServiceInfoListBLL enterpriseServiceInfoListBLL = new zlzw.BLL.EnterpriseServiceInfoListBLL();
                enterpriseServiceInfoListBLL.Add(enterpriseServiceInfoListModel);
            }

            // 2. Close this window and Refresh parent window
            PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
        }
コード例 #6
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.EnterpriseServiceInfoListBLL enterpriseServiceInfoListBLL = new zlzw.BLL.EnterpriseServiceInfoListBLL();
                DataTable dt = enterpriseServiceInfoListBLL.GetList("EnterpriseServiceInfoGUID='" + strSelectID + "'").Tables[0];
                zlzw.Model.EnterpriseServiceInfoListModel enterpriseServiceInfoListModel = enterpriseServiceInfoListBLL.GetModel(int.Parse(dt.Rows[0]["EnterpriseServiceInfoID"].ToString()));
                enterpriseServiceInfoListModel.IsEnable = 0;
                enterpriseServiceInfoListBLL.Update(enterpriseServiceInfoListModel);
                EnterpriseServiceInfoList_BindGrid();

                #endregion
            }
            else
            {
                return;
            }
        }