using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ChuPiao.Common.Models;
using ChuPiao.Common.Enums;
using ChuPiao.Common.Utils;

namespace ChuPiao.AutoPrint.Desktop.AutoPrint
{
    public partial class TicketInfo : Form
    {
        private L_LotTicketEntity _ticket;

        public TicketInfo(L_LotTicketEntity ticket)
        {
            _ticket = ticket;

            InitializeComponent();
        }

        private void TicketInfo_Load(object sender, EventArgs e)
        {
            this.labelMacNum.Text = _ticket.L_MacNumber;

            string codetype = "";
            if (_ticket.LotId == (int)Lottype.Jz || _ticket.LotId == (int)Lottype.Jl || _ticket.LotId == (int)Lottype.Bd)
            {
                JcCodeTypeEnum codeTypeEnum = (JcCodeTypeEnum)_ticket.L_CodeType;
                codetype = EnumDescription.GetFieldText(codeTypeEnum);
            }
            this.labelPlayStr.Text = string.Concat(LotPlayTypeHashTable.LotTypeHashTable[_ticket.LotId], LotPlayTypeHashTable.PlayTypeHashTable[_ticket.L_PlayId], codetype);

            this.labelExpect.Text = _ticket.L_Expect;
            this.textBoxTicketSN.Text = _ticket.L_TicketSn;
            this.textBoxOrderSN.Text = _ticket.L_OrderSn;
            this.labelMutiple.Text = _ticket.L_Mutiple.ToString();
            this.labelMoney.Text = _ticket.L_Money.ToString();
            this.labelEndTime.Text = _ticket.L_EndTime.ToString();
            this.textBoxCode.Text = _ticket.L_Code;
            this.textBoxTicketCode.Text = _ticket.L_TicketCode;
        }
    }
}