示例#1
0
 private void MouseClickSetType(SeatMaDll.BHSeatControl seat, SimBlock simBlockObj)
 {
     //seat.SeatType = SeatMaDll.EditSeatItem.GetControl_ByFlag(szSeatBlockFlag);
     SeatMaDll.Seat st = (SeatMaDll.Seat)seat.Tag;
     st._seatBlockId = simBlockObj._BlockId;
     st._BackColor   = simBlockObj._BgColour;
     //seat.IsUsedBackColor = true;
 }
示例#2
0
        public DlgGroupControlSetBlock(SeatMaDll.BHSeatControl bhSeat, SimBlock simBlockObj)
        {
            InitializeComponent();
            _bhSeat      = bhSeat;
            _SimBlockObj = simBlockObj;

            _SeatingChartId = ((SeatMaDll.Seat)bhSeat.Tag)._seatSeatingChartId;
        }
示例#3
0
        private static SimBlock ChangeObj(DataRow dr)
        {
            SimBlock obj = new SimBlock();

            obj._BlockId   = dr["BlockId"] == DBNull.Value ? "" : dr["BlockId"].ToString();
            obj._BlockName = dr["BlockName"] == DBNull.Value ? "" : dr["BlockName"].ToString();
            obj._BgColour  = dr["BgColour"] == DBNull.Value ? 0 : Convert.ToInt32(dr["BgColour"]);
            return(obj);
        }
示例#4
0
        public void QueryData()
        {
            seatChartDispScreen1.seatChartDisp1.ClearItems();
            seatChartDispScreen1.seatChartDisp1.Invalidate();
            seatChartDispScreen1.SetBottomDisplay_Right("");

            if (uC_HallInfoSeek1.cbb_SeatingChart.SelectedItem == null)
            {
                return;
            }
            _seatingChart = (SeatMaDll.SeatingChart)uC_HallInfoSeek1.cbb_SeatingChart.SelectedItem;

            SetSeatResource(_seatingChart.BgColour);

            int nLeftPad = (int)((tableLayoutPanel_All.ColumnStyles[2].Width - _nSCPanelWidth) / 2);
            int nTopPad  = (int)((tableLayoutPanel_All.RowStyles[3].Height - _nSCPanelContainerHeight) / 2);

            seatChartDispScreen1.seatChartDisp1.ImportSeatChartWithBlockAndPad(_seatingChart, nLeftPad, nTopPad);

            int nSeatCount = seatChartDispScreen1.seatChartDisp1.GetAllSeatCount();

            seatChartDispScreen1.SetBottomDisplay_Right("座位数量:" + nSeatCount.ToString());

            _SimBlockObj = null;

            uC_ImageButtonVPanel_Block.Clear();
            _SimBlockObj = null;

            if (_seatingChart == null)
            {
                return;
            }
            List <SimBlock> list = SimBlock.RetrieveItems(_seatingChart.SeatingChartId);

            if (list == null || list.Count <= 0)
            {
                return;
            }
            uC_ImageButtonVPanel_Block.Clear();
            List <ImageButtonItem> listImgButton = new List <ImageButtonItem>();

            foreach (SimBlock sb in list)
            {
                ImageButtonItem ibi = new ImageButtonItem();
                ibi._Img         = global::WinFormUI.Properties.Resources.SeatChartFlag;
                ibi._DisplayText = sb._BlockName;
                ibi._BackColor   = sb._BgColour;
                ibi._objFlag     = sb;
                listImgButton.Add(ibi);
            }
            uC_ImageButtonVPanel_Block.CreateControl(listImgButton);
        }
示例#5
0
        public static List <SimBlock> RetrieveItems(string szSeatingChartId)
        {
            List <SimBlock> list = new List <SimBlock>();
            DataTable       dt   = new BlockDbo().RetrieveALLItems(szSeatingChartId);

            if (dt == null || dt.Rows.Count <= 0)
            {
                return(list);
            }
            foreach (DataRow dr in dt.Rows)
            {
                SimBlock obj = ChangeObj(dr);
                list.Add(obj);
            }
            return(list);
        }
示例#6
0
        private void uC_ImageButtonPanel1_ImageButtonItemClick(object sender, EventArgs e)
        {
            Label    ib = (Label)sender;
            SimBlock sb = (SimBlock)ib.Tag;

            _SimBlockObj = sb;
            uC_ImageButtonPanel1.ClearAlluibControlSelected();
            ib.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;

            if (seatChartDisp1._seatCharItemsSelect._listControlSelect.Count > 0)
            {
                foreach (Control ctl in seatChartDisp1._seatCharItemsSelect._listControlSelect)
                {
                    if (ctl.GetType() == typeof(SeatMaDll.BHSeatControl))
                    {
                        SeatMaDll.BHSeatControl seat = (SeatMaDll.BHSeatControl)ctl;
                        MouseClickSetType(seat, _SimBlockObj);
                    }
                }
            }
        }
示例#7
0
        public void ReQueryDataBy(int nIndex)
        {
            uC_HallInfoSeek1.cbb_SeatingChart.SelectedIndex = nIndex;
            if (uC_HallInfoSeek1.cbb_SeatingChart.SelectedItem == null)
            {
                return;
            }
            _seatingChart = (SeatMaDll.SeatingChart)uC_HallInfoSeek1.cbb_SeatingChart.SelectedItem;
            seatChartDispScreen1.seatChartDisp1.ImportSeatChartWithBlock(_seatingChart);

            _SimBlockObj = null;

            uC_ImageButtonVPanel_Block.Clear();
            _SimBlockObj = null;

            if (_seatingChart == null)
            {
                return;
            }
            List <SimBlock> list = SimBlock.RetrieveItems(_seatingChart.SeatingChartId);

            if (list == null || list.Count <= 0)
            {
                return;
            }
            uC_ImageButtonVPanel_Block.Clear();
            List <ImageButtonItem> listImgButton = new List <ImageButtonItem>();

            foreach (SimBlock sb in list)
            {
                ImageButtonItem ibi = new ImageButtonItem();
                ibi._Img         = global::WinFormUI.Properties.Resources.SeatChartFlag;
                ibi._DisplayText = sb._BlockName;
                ibi._BackColor   = sb._BgColour;
                ibi._objFlag     = sb;
                listImgButton.Add(ibi);
            }
            uC_ImageButtonVPanel_Block.CreateControl(listImgButton);
        }
示例#8
0
        private void InitAlluibControlSelected()
        {
            foreach (Control ctl in uC_ImageButtonPanel1.Controls)
            {
                if (ctl.GetType() == typeof(UC_ImageButton))
                {
                    UC_ImageButton uib = (UC_ImageButton)ctl;
                    if (uib.Tag == null)
                    {
                        continue;
                    }

                    SimBlock sb = (SimBlock)uib.Tag;

                    if (sb._BlockId == _SimBlockObj._BlockId)
                    {
                        uib.Selected = true;
                        return;
                    }
                }
            }
        }
示例#9
0
        private void InitBlock()
        {
            List <SimBlock> list = SimBlock.RetrieveItems(_SeatingChartId);

            if (list == null || list.Count <= 0)
            {
                return;
            }
            uC_ImageButtonPanel1.Clear();

            List <ImageButtonItem> listImgButton = new List <ImageButtonItem>();

            foreach (SimBlock sb in list)
            {
                ImageButtonItem ibi = new ImageButtonItem();
                ibi._Img         = global::WinFormUI.Properties.Resources.SeatChartFlag;
                ibi._DisplayText = sb._BlockName;
                ibi._BackColor   = sb._BgColour;
                ibi._objFlag     = sb;
                listImgButton.Add(ibi);
            }
            uC_ImageButtonPanel1.CreateControl(listImgButton);
        }
示例#10
0
        private void uC_ImageButtonVPanel_Block_ImageButtonItemClick(object sender, EventArgs e)
        {
            Label    ib = (Label)sender;
            SimBlock sb = (SimBlock)ib.Tag;

            _SimBlockObj = sb;
            uC_ImageButtonVPanel_Block.ClearAlluibControlSelected();
            ib.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;

            if (seatChartDispScreen1.seatChartDisp1._seatCharItemsSelect._listControlSelect.Count > 0)
            {
                bool bHaveGroupItem = false;
                foreach (Control ctl in seatChartDispScreen1.seatChartDisp1._seatCharItemsSelect._listControlSelect)
                {
                    if (ctl.GetType() == typeof(SeatMaDll.BHSeatControl))
                    {
                        SeatMaDll.BHSeatControl seat = (SeatMaDll.BHSeatControl)ctl;
                        SeatMaDll.Seat          st   = (SeatMaDll.Seat)seat.Tag;

                        if (st._brotherList.Count <= 0)
                        {
                            st._seatBlockId = _SimBlockObj._BlockId;
                            st._BackColor   = _SimBlockObj._BgColour;
                        }
                        else
                        {
                            bHaveGroupItem = true;
                        }
                    }
                }
                if (bHaveGroupItem)
                {
                    MessageBox.Show("选项中有双座或包厢座,请点击该包厢进行设定!", "系统提示");
                }
            }
        }
示例#11
0
 public void ClearItems()
 {
     uC_ImageButtonVPanel_Block.Clear();
     seatChartDispScreen1.seatChartDisp1.ClearItems();
     _SimBlockObj = null;
 }