Ejemplo n.º 1
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.VentureStarListBLL ventureStarListBLL = new zlzw.BLL.VentureStarListBLL();
                DataTable dt = ventureStarListBLL.GetList("VentureStarGUID='" + strSelectID + "'").Tables[0];
                zlzw.Model.VentureStarListModal ventureStarListModal = ventureStarListBLL.GetModel(int.Parse(dt.Rows[0]["VentureStarID"].ToString()));
                ventureStarListModal.IsEnable = 0;
                ventureStarListBLL.Update(ventureStarListModal);
                VentureStarList_BindGrid();

                #endregion
            }
            else
            {
                return;
            }
        }
Ejemplo n.º 2
0
 private void LoadData(string strType)
 {
     if (strType == "1")
     {
         string strID = Request.QueryString["value"];//操作ID
         zlzw.BLL.VentureStarListBLL ventureStarListBLL = new zlzw.BLL.VentureStarListBLL();
         DataTable dt = ventureStarListBLL.GetList("VentureStarGUID='" + strID + "'").Tables[0];
         zlzw.Model.VentureStarListModal ventureStarListModal = ventureStarListBLL.GetModel(int.Parse(dt.Rows[0]["VentureStarID"].ToString()));
         drpRegionList.SelectedValue   = ventureStarListModal.Other01.ToString();
         drpStoreType.SelectedValue    = ventureStarListModal.DictionaryKey;      //所属门店
         txbVentureStarName.Text       = ventureStarListModal.VentureStarName;    //创业明星姓名
         FCKeditor1.Value              = ventureStarListModal.VentureStarContent; //创业明星介绍
         labPreviweImg.ImageUrl        = ventureStarListModal.VentureStarImage.Split('~')[1];
         ViewState["VentureStarImage"] = ventureStarListModal.VentureStarImage;   //创业明星图片地址
         ViewState["PublishDate"]      = ventureStarListModal.PublishDate.ToString();
         ViewState["VentureStarGUID"]  = ventureStarListModal.VentureStarGUID.ToString();
         ToolbarText2.Text             = "编辑一个创业明星";
     }
     btnClose.OnClientClick = ActiveWindow.GetConfirmHideReference();
 }