public static bool UpdatBlockData(SeatMaDll.SeatChartDisp seatChartDispTemp) { DataObject.DBO.SeatDbo dbo = new DataObject.DBO.SeatDbo(); List <DataObject.PO.SeatPo> listSeat = new List <DataObject.PO.SeatPo>(); bool bR = true; foreach (Control c in seatChartDispTemp.Controls) { if (c.GetType() == typeof(SeatMaDll.BHSeatControl)) { SeatMaDll.Seat si = (SeatMaDll.Seat)c.Tag; if (listSeat != null) { listSeat.Clear(); } listSeat = SeatAction.SplitDBObj(si); foreach (DataObject.PO.SeatPo po in listSeat) { if (!dbo.UpdateBlock(po.SEATID, po.BLOCKID)) { bR = false; } } } } return(bR); }
/// <summary> /// 现实座位信息 /// </summary> /// <param name="seat"></param> private void ShowSeatInfo(SeatMaDll.BHSeatControl seat) { //排号 价格 类型 SeatMaDll.Seat st = (SeatMaDll.Seat)seat.Tag; List <DataObject.PO.SeatPo> list = SeatAction.SplitDBObj(st); StringBuilder sb = new StringBuilder(); string seattype = string.Empty; switch (list[0].SEATTYPE) { #region case "0": seattype = "单座"; break; case "1": seattype = "双座"; break; case "2": seattype = "包厢"; break; case "3": seattype = "残障"; break; case "4": seattype = "残护"; break; case "5": seattype = "不适宜"; break; case "6": seattype = "停售"; break; case "7": seattype = "工作席"; break; case "8": seattype = "特殊"; break; #endregion } //string seattype = Flamingo.BLL.Ticket.ToTicketType(list[0].SEATTYPE).ToString(); string ticketid = _szShowplanId + list[0].SEATID; sb.Append(string.Format(Flamingo.BLL.Ticket.GetShowSoldSeatInfo(ticketid), list[0].SEATNUMBER, seattype)); MessageBox.Show(sb.ToString(), "座位信息", MessageBoxButtons.OK, MessageBoxIcon.None); }
private void seatChartDisp1__LeftOneClick(object sender, SeatMaDll.SelectOneSeat_Events e) { SeatMaDll.BHSeatControl seat = e.m_bhSeat; SeatMaDll.Seat st = (SeatMaDll.Seat)seat.Tag; List <DataObject.PO.SeatPo> list = SeatAction.SplitDBObj(st); string AlowLeftClickSeatType = "0,1,2,3"; //判断座位类型是否允许选中 if (!AlowLeftClickSeatType.Contains(list[0].SEATTYPE)) { return; } if (st._seatStatusFlag == "0") { int statusNum = Flamingo.BLL.SeatStatus.Lock(_szShowplanId, list[0].SEATID, FrmMain.curUser.UserId); MouseClickSetStatus(seat, statusNum.ToString()); } }
public static bool CommitData(SeatMaDll.SeatChartDisp seatChartDispTemp, ref SeatMaDll.SeatingChart seatingchartTemp, ref SeatMaDll.EditSeatInfo editSeatInfoTemp) { try { DataObject.DBO.SeatDbo dbo = new DataObject.DBO.SeatDbo(); //SeatAction.DeleteBySeatingChartId(seatingchartTemp.SeatingChartId); List <DataObject.PO.SeatPo> listSeat = new List <DataObject.PO.SeatPo>(); int nSeatCount = 0; foreach (Control c in seatChartDispTemp.Controls) { if (c.GetType() == typeof(SeatMaDll.BHSeatControl)) { string szSeatGuid = string.Format("{0:D4}", nSeatCount); SeatMaDll.Seat si = (SeatMaDll.Seat)c.Tag; if (si._brotherList.Count <= 0) { nSeatCount++; szSeatGuid = string.Format("{0:D4}", nSeatCount); si._seatSeatingChartId = seatingchartTemp.SeatingChartId; si._seatId = si._seatSeatingChartId + szSeatGuid; si._seatBlockId = si._seatSeatingChartId + "0"; } else { for (int i = 0; i < si._brotherList.Count; i++) { nSeatCount++; szSeatGuid = string.Format("{0:D4}", nSeatCount); si._brotherList[i]._seatSeatingChartId = seatingchartTemp.SeatingChartId; szSeatGuid = si._brotherList[i]._seatSeatingChartId + szSeatGuid; si._brotherList[i]._seatId = szSeatGuid; si._brotherList[i]._seatBlockId = si._brotherList[i]._seatSeatingChartId + "0"; } } if (listSeat != null) { listSeat.Clear(); } listSeat = SeatAction.SplitDBObj(si); foreach (DataObject.PO.SeatPo po in listSeat) { if (dbo.Insert(po)) { seatingchartTemp._listSiteItem.Add(si); } } } } seatingchartTemp.Seats = editSeatInfoTemp._ObjSeatingChart.Seats; seatingchartTemp.Rows = editSeatInfoTemp._ObjSeatingChart.Rows; seatingchartTemp.Columns = editSeatInfoTemp._ObjSeatingChart.Columns; seatingchartTemp.RowSpace = editSeatInfoTemp._ObjSeatingChart.RowSpace; seatingchartTemp.ColumnSpace = editSeatInfoTemp._ObjSeatingChart.ColumnSpace; seatingchartTemp.Rotation = editSeatInfoTemp._ObjSeatingChart.Rotation; bool bR = SeatingChartAction.ResetData(seatingchartTemp); bR = Hall.UpdateSeat(seatingchartTemp.HallId); return(bR); } catch (Exception ex) { throw ex; } }