Exemplo n.º 1
0
        private void Button_Click_Print(object sender, RoutedEventArgs e)
        {
            if (bgwr == null)
            {
                return;
            }
            if (bgwr.IsBusy)
            {
                cc.CanPollingLoop = false;
            }
            //btmp.Save("check.bmp", System.Drawing.Imaging.ImageFormat.Bmp);
            Logic.SerialPort.Citizen cn = new Logic.SerialPort.Citizen();
            Logic.Payment            p  = new Logic.Payment();
            p.DateTime = DateTime.Now;
            p.Member   = CurrentMember;
            p.Sum      = this.sum;
            File.AppendAllText(OriflameApplication.Instance.PaymentLog, string.Format("\t{0}\t{1}\t{2}\t{3}\t" + Environment.NewLine, p.DateTime, this.CurrentMember.ID, this.CurrentMember.Name, p.Sum));
            MemberFactory.SaveSum(p);

            cn.Sum      = p.Sum.ToString();
            cn.Id       = p.Member.ID.ToString();
            cn.Name     = p.Member.Name.Split(' ')[0];
            cn.DateTime = p.DateTime.ToString();

            cn.Print();
        }