コード例 #1
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();
 }
コード例 #2
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;
            }
        }