Example #1
0
 //确认放行(出口)
 private void OutYes_Click(object sender, RoutedEventArgs e)
 {
     if (outCar.Text != "")
     {
         if (Model.DicValue.Outpicpath != null)
         {
             int PayRes = upc.UserParkngOut(outCar.Text, Model.DicValue.Outpicpath, Model.DicValue.MangerParkID);
             if (PayRes > 0)
             {
                 ParkMemberControl    pmc     = new ParkMemberControl();
                 ViewMemberInfoEntity vmieRes = pmc.GetCurrentMemberInfo(outCar.Text, Model.DicValue.MangerParkID);
                 if (vmieRes != null)
                 {
                     MemberType.Content = "会员";
                 }
                 else
                 {
                     MemberType.Content = "普通用户";
                 }
                 ParkingPayInfoEntity PayInfo = upc.FiguringUserPayInfo(PayRes);
                 lblCarlicense.Content       = outCar.Text;
                 lblPrice.Content            = PayInfo.Price.ToString();
                 lblStopTime.Content         = PayInfo.Hours.ToString();
                 Lostmoney.Text              = PayInfo.Price.ToString();
                 outCar.Text                 = ""; outCar.IsEnabled = false;
                 Model.DicValue.PayParkingID = PayInfo.ParkingId;
                 Model.DicValue.current      = PayInfo;
                 pictureBox4.Image           = null;
                 //Model.DicValue.Outpicpath = null;//模拟测试此条注释
             }
         }
         else
         {
             System.Windows.MessageBox.Show("未检测到车牌识别!");
         }
     }
     else
     {
         System.Windows.MessageBox.Show("未检测到车牌识别!");
     }
 }
Example #2
0
 //使用优惠券
 private void BTCoupon_Click(object sender, RoutedEventArgs e)
 {
     if (CbxTicket.IsEnabled == false)
     {
         CbxTicket.IsEnabled = true;
         BTCoupon.Content    = "确认使用";
         CbxTicket.Items.Clear();
         Model.DicValue.TicketTypeList.Clear();
         GetAllTicketType();
     }
     else
     {
         if (Model.DicValue.current != null)
         {
             BTCoupon.Content = "优惠券";
             ParkingPayInfoEntity payinfo = upc.UseParkingTicket(Model.DicValue.current, TicketTypeId);
             Lostmoney.Text = payinfo.Price.ToString();
             Model.DicValue.PayParkingID = payinfo.ParkingId;
         }
         CbxTicket.IsEnabled = false;
     }
 }