Esempio n. 1
0
 private void btnYes_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(txtName.Text.Trim()) && string.IsNullOrEmpty(txtVipNumber.Text.Trim()))
     {
         MessageBox.Show("请填写填写会员卡号或姓名");
     }
     else if (string.IsNullOrEmpty(txtPWD.Text.Trim()))
     {
         MessageBox.Show("请填写密码");
     }
     else if (string.IsNullOrEmpty(txtCardNum.Text.Trim()))
     {
         MessageBox.Show("请填写身份证号");
     }
     else
     {
         if (!string.IsNullOrEmpty(txtVipNumber.Text.Trim()))
         {
             MessageBox.Show("暂无会员卡验证订票功能");
         }
         else
         {
             Flamingo.Entity.Para_ReservationTicket model = Flamingo.BLL.Ticket.ReservationValidate(_ShowPlanId, txtName.Text.Trim(), txtPWD.Text.Trim(), txtCardNum.Text.Trim());
             if (string.IsNullOrEmpty(model.ErrorMsg))
             {
                 SaleTicket.frmReservationOut frm = new frmReservationOut();
                 frm.Parent                 = this.Parent;
                 frm.ShowPlanDate           = _ShowPlanDate;
                 frm.ShowPlanHall           = _ShowPlanHall;
                 frm.ShowPlanName           = _ShowPlanName;
                 frm.ShowPlanStartTime      = _ShowPlanStartTime;
                 frm.Model                  = model;
                 frm.FilmId                 = _FilmId;
                 frm.ShowPlanId             = _ShowPlanId;
                 frm.TheaterName            = _TheaterName;
                 frm.HallId                 = _HallId;
                 frm.CheckingType           = _CheckingType;
                 frm.IsShowGroup            = _isShowGroup;
                 frm.ShowGroupShowPlanIds   = _showGroupShowPlanIds;
                 frm.ShowGroupFilmIds       = _showGroupFilmIds;
                 frm.ShowGroupShowPlanNames = _showGroupShowPlanNames;
                 frm.ShowPlanPosition       = _showPlanPosition;
                 frm.ShowDialog();
                 _SeatStatusSimList_Cancel        = frm.SeatStatusSimList_Cancel;
                 _SeatStatusSimList_Sold          = frm.SeatStatusSimList_Sold;
                 _SeatStatusSimList_SoldByVoucher = frm.SeatStatusSimList_SoldByVoucher;
                 this.Close();
             }
             else
             {
                 MessageBox.Show(model.ErrorMsg);
             }
         }
     }
 }
Esempio n. 2
0
        private void btnYes_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtName.Text.Trim()))
            {
                MessageBox.Show("请填写姓名");
            }
            else if (string.IsNullOrEmpty(txtPWD.Text.Trim()))
            {
                MessageBox.Show("请填写密码");
            }
            else if (string.IsNullOrEmpty(txtRPWD.Text.Trim()))
            {
                MessageBox.Show("请填写确认密码");
            }
            else if (txtPWD.Text.Trim() != txtRPWD.Text.Trim())
            {
                MessageBox.Show("两次输入密码不一致");
            }
            else if (string.IsNullOrEmpty(txtTelephone.Text.Trim()))
            {
                MessageBox.Show("请填写电话");
            }
            else if (string.IsNullOrEmpty(txtCardNum.Text.Trim()))
            {
                MessageBox.Show("请填写身份证号");
            }
            else
            {
                //重新组合 售票类型和票价
                sb_tickettypes.Clear();
                sb_ticketprices.Clear();
                foreach (DataGridViewRow row in dgvTicketList.Rows)
                {
                    if (row.Cells["票种"].Value.ToString() == "零售")
                    {
                        sb_tickettypes.Append(row.Cells["售票类型"].Value.ToString());
                    }
                    else if (row.Cells["票种"].Value.ToString() == "学生")
                    {
                        sb_tickettypes.Append(Flamingo.BLL.Ticket.ToTicketType(Flamingo.BLL.Ticket.TicketType.学生).ToString());
                    }
                    else if (row.Cells["票种"].Value.ToString() == "团体")
                    {
                        sb_tickettypes.Append(Flamingo.BLL.Ticket.ToTicketType(Flamingo.BLL.Ticket.TicketType.团体).ToString());
                    }
                    else if (row.Cells["票种"].Value.ToString() == "特价")
                    {
                        sb_tickettypes.Append(Flamingo.BLL.Ticket.ToTicketType(Flamingo.BLL.Ticket.TicketType.特价).ToString());
                    }

                    sb_tickettypes.Append("|");
                    sb_ticketprices.Append(row.Cells["价格"].Value.ToString());
                    sb_ticketprices.Append("|");
                }
                sb_tickettypes.Remove(sb_tickettypes.Length - 1, 1);
                sb_ticketprices.Remove(sb_ticketprices.Length - 1, 1);

                Flamingo.Entity.Para_ReservationTicket pReservationTicket = new Flamingo.Entity.Para_ReservationTicket();
                pReservationTicket.Count          = Int32.Parse(TicketCount);
                pReservationTicket.CustomerCode   = txtPWD.Text.Trim();
                pReservationTicket.CustomerMobile = txtTelephone.Text.Trim();
                pReservationTicket.CustomerName   = txtName.Text.Trim();
                pReservationTicket.Identity       = txtCardNum.Text.Trim();
                pReservationTicket.IssuedBy       = FrmMain.curUser.UserId; //user lzz
                pReservationTicket.SeatStatusIds  = sb_seatstatusids.ToString();
                pReservationTicket.TicketTypes    = sb_tickettypes.ToString();
                pReservationTicket.SeatNumbers    = sb_seatnumbers.ToString();
                pReservationTicket.TicketPrices   = sb_ticketprices.ToString();
                pReservationTicket.ShowPlanId     = ShowPlanId;

                bool tf = Flamingo.BLL.Ticket.ReservationTicket(pReservationTicket);
                if (tf == true)
                {
                    this.DialogResult = DialogResult.Yes;
                    this.Close();
                }
                else
                {
                    MessageBox.Show("添加预定信息失败");
                }
            }
        }
Esempio n. 3
0
 /// <summary>
 /// 影票预定
 /// </summary>
 /// <param name="pReservationTicket">影票预定参数实体</param>
 /// <returns></returns>
 public static bool ReservationTicket(Flamingo.Entity.Para_ReservationTicket pReservationTicket)
 {
     return(DAL.Ticket.ReservationTicket(pReservationTicket));
 }