protected void Grid_RowCommand(object sender, FineUI.GridCommandEventArgs e) { if (e.CommandName == "ActionDelete") { //执行删除操作 string userName = GridMsgPostItems.Rows[e.RowIndex].DataKeys[0].ToString(); foreach (SeatManage.ClassModel.MsgPostItem item in msgpostSet.PostItems) { if (item.UserName == userName) { msgpostSet.PostItems.Remove(item); break; } } try { SeatManage.Bll.T_SM_SystemSet.SaveMsgPostSet(msgpostSet); BindData(); } catch (Exception ex) { FineUI.Alert.ShowInTop("执行出现问题!"); } } }
protected void Grid1_RowCommand(object sender, FineUI.GridCommandEventArgs e) { if (e.CommandName == "Action1" || e.CommandName == "Action2") { labResult.Text = String.Format("你点击了第 {0} 行,第 {1} 列,行命令是 {2}", e.RowIndex + 1, e.ColumnIndex + 1, e.CommandName); } }
protected void Grid1_RowCommand(object sender, FineUI.GridCommandEventArgs e) { if (e.CommandName == "Action1" || e.CommandName == "Action2") { object[] keys = Grid1.DataKeys[e.RowIndex]; labResult.Text = String.Format("你点击了第 {0} 行,第 {1} 列,行命令是 {2}", e.RowIndex + 1, e.ColumnIndex + 1, e.CommandName) + "<br />" + String.Format("当前行数据 - 编号:{0},姓名:{1}", keys[0], keys[1]); } }
protected void xxx_RowCommand(object sender, FineUI.GridCommandEventArgs e) { int id = Convert.ToInt32(xxx.DataKeys[e.RowIndex][0]); if (e.CommandName == "Delete") { //userGroupService.Delete(userGroupService.FindBy(id)); } xxxDataBind(); }
protected void grdPath_RowCommand(object sender, FineUI.GridCommandEventArgs e) { int id = Convert.ToInt32(grdPath.DataKeys[e.RowIndex][0]); if (e.CommandName == "Delete") { pathService.Delete(pathService.FindBy(id)); } grdPathDataBind(); }
protected void grdUserGroup_RowCommand(object sender, FineUI.GridCommandEventArgs e) { UserGroupService userGroupService = new UserGroupService(); int id = Convert.ToInt32(grdUserGroup.DataKeys[e.RowIndex][0]); if (e.CommandName == "Delete") { userGroupService.Delete(userGroupService.FindBy(id)); } grdUserGroupDataBind(); }
protected void Grid1_RowCommand(object sender, FineUI.GridCommandEventArgs e) { if (e.CommandName == "Delete") { int rowID = Convert.ToInt32(Grid1.DataKeys[e.RowIndex][0]); DeleteRowByID(rowID); BindGrid(); Alert.ShowInTop("删除数据成功!(表格数据已重新绑定)"); } }
protected void Grid1_RowCommand(object sender, FineUI.GridCommandEventArgs e) { if (e.CommandName == "CheckBox1") { CheckBoxField checkField = (CheckBoxField)Grid1.FindColumn(e.ColumnIndex); bool checkState = checkField.GetCheckedState(e.RowIndex); Alert.ShowInTop(String.Format("你点击了第 {0} 行,第 {1} 列,选中状态:{2}", e.RowIndex + 1, e.ColumnIndex + 1, checkState)); } else if (e.CommandName == "Action1" || e.CommandName == "Action2") { Alert.ShowInTop(String.Format("你点击了第 {0} 行,第 {1} 列,行命令是 {2}", e.RowIndex + 1, e.ColumnIndex + 1, e.CommandName)); } }
protected void GridStudyRoom_RowCommand(object sender, FineUI.GridCommandEventArgs e) { if (e.CommandName == "ActionDelete") { SeatManage.ClassModel.StudyRoomInfo room = new SeatManage.ClassModel.StudyRoomInfo(); room.StudyRoomNo = GridStudyRoom.Rows[e.RowIndex].DataKeys[0].ToString(); if (!SeatManage.Bll.StudyRoomOperation.DeleteStudyRoom(room)) { FineUI.Alert.ShowInTop("删除失败!"); } else { FineUI.Alert.ShowInTop("删除完成!"); BindStudyRoom(); } } }
protected void GridReadRoom_RowCommand(object sender, FineUI.GridCommandEventArgs e) { //if (e.CommandName == "ActionDelete") //{ // SeatManage.ClassModel.ReadingRoomInfo room = new SeatManage.ClassModel.ReadingRoomInfo(); // room.No = GridReadRoom.Rows[e.RowIndex].DataKeys[0].ToString(); // if (!SeatManage.Bll.T_SM_ReadingRoom.DeleteReadingRoom(room)) // { // FineUI.Alert.ShowInTop("删除失败!"); // } // else // { // FineUI.Alert.ShowInTop("删除完成!"); // BindReadingRoom(); // } //} }
protected void GridReadRoom_RowCommand(object sender, FineUI.GridCommandEventArgs e) { //if (e.CommandName == "ActionDelete") //{ // SeatManage.ClassModel.ReadingRoomInfo room = new SeatManage.ClassModel.ReadingRoomInfo(); // room.No = GridReadRoom.Rows[e.RowIndex].DataKeys[0].ToString(); // if (!SeatManage.Bll.T_SM_ReadingRoom.DeleteReadingRoom(room)) // { // FineUI.Alert.ShowInTop("删除失败!"); // } // else // { // FineUI.Alert.ShowInTop("删除完成!"); // BindReadingRoom(); // } //} if (e.CommandName == "ActionPrint") { try { string roomNo = GridReadRoom.Rows[e.RowIndex].DataKeys[0].ToString(); string roomName = GridReadRoom.Rows[e.RowIndex].DataKeys[1].ToString(); string subPath = Server.MapPath("~/SeatQRCode/" + roomNo + "/"); if (Directory.Exists(subPath)) { Directory.Delete(subPath, true); } List <SeatManage.ClassModel.Seat> listSeat = SeatManage.Bll.T_SM_Seat.GetSeatListByRoomNum(roomNo, false); foreach (SeatManage.ClassModel.Seat item in listSeat) { SeatQRCodeManager.CreatSingleSeatQRCode(roomNo, roomName, item.SeatNo); } FineUI.Alert.Show("生成座位二维码成功"); } catch (Exception ex) { WriteLog.Write(ex.ToString()); throw; } } }
/// <summary> /// 删除事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void VRGrid_RowCommand(object sender, FineUI.GridCommandEventArgs e) { }