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.StoreStatisticsListBLL storeStatisticsListBLL = new zlzw.BLL.StoreStatisticsListBLL(); zlzw.Model.StoreStatisticsListModal storeStatisticsListModal = storeStatisticsListBLL.GetModel(int.Parse(Get_StoreStatisticsID(strSelectID))); storeStatisticsListModal.IsEnable = 0; storeStatisticsListBLL.Update(storeStatisticsListModal); StoreStatisticsList_BindGrid(); #endregion } else { return; } }
private void LoadData(string strType) { if (strType == "1") { string strID = Request.QueryString["value"];//操作ID zlzw.BLL.StoreStatisticsListBLL storeStatisticsListBLL = new zlzw.BLL.StoreStatisticsListBLL(); zlzw.Model.StoreStatisticsListModal storeStatisticsListModal = storeStatisticsListBLL.GetModel(int.Parse(Get_StoreStatisticsID(strID))); drpStoreDictionaryKey.SelectedValue = storeStatisticsListModal.StoreDictionaryKey; //所属店铺 drpDictionaryKey.SelectedValue = storeStatisticsListModal.DictionaryKey; //所属指标 txbStoreStatisticsDate.Text = storeStatisticsListModal.StoreStatisticsDate.ToString(); //评比日期 txbIndexValue.Text = storeStatisticsListModal.IndexValue; //指标数值 txbStoreStatisticsOrder.Text = storeStatisticsListModal.StoreStatisticsOrder.ToString(); //排序序号 ViewState["StoreStatisticsDate"] = storeStatisticsListModal.StoreStatisticsDate.ToString(); ViewState["PublishDate"] = storeStatisticsListModal.PublishDate.ToString(); ViewState["StoreStatisticsGUID"] = storeStatisticsListModal.StoreStatisticsGUID.ToString(); ToolbarText2.Text = "编辑一个指标评比"; } btnClose.OnClientClick = ActiveWindow.GetConfirmHideReference(); }