Пример #1
0
 public FrmRFCancel(RFFYD fyd, ICCard TempCard)
 {
     this.InitializeComponent();
     this.fyd          = fyd;
     this.card         = TempCard;
     base.DialogResult = DialogResult.Cancel;
 }
Пример #2
0
 public bool GetBillInfo()
 {
     try
     {
         string cph = this.txt_vehno.Text.Trim();
         if (cph == string.Empty)
         {
             return(false);
         }
         RFFYD[] rFFYD = this.cs.GetRFFYD(cph);
         if (rFFYD == null)
         {
             MessageBox.Show("找不到对应的RF发运单!");
             return(false);
         }
         if (rFFYD.Length > 1)
         {
             MessageBox.Show("存在多个对应的RF发运单!");
             return(false);
         }
         this.FYD = rFFYD[0];
         this.ViewBill();
         return(true);
     }
     catch (Exception exception)
     {
         MessageBox.Show("网络处理错误" + exception.ToString());
         return(false);
     }
 }
Пример #3
0
 private void btn_ok_Click(object sender, EventArgs e)
 {
     if ((this.FYD != null) && (this.card != null))
     {
         if (this.IC.ISFixVeh(this.FYD.vehno))
         {
             MessageBox.Show("固定车辆请做多次卡车辆发卡单进行补卡!");
         }
         else
         {
             try
             {
                 string code = FrmMain.localinfo.workpoint.Code;
                 string iD   = LocalInfo.Current.user.ID;
                 VehIC_WF.CommonService.Result result = this.cs.UpdateFYDBillCard(this.FYD.billno, this.card.ICNo, code, iD);
                 if (!result.Flag)
                 {
                     MessageBox.Show(result.Desc);
                 }
                 else
                 {
                     MessageBox.Show("补卡成功!");
                     this.card = null;
                     this.FYD  = null;
                     this.InitForm();
                 }
             }
             catch (Exception)
             {
                 MessageBox.Show("数据异常,请重试!");
             }
         }
     }
 }
Пример #4
0
 public void HandleCardMessage(Device.CardReader device, string cardid)
 {
     if (this.CheckCardID(cardid) && this.Cards.CheckCard(cardid))
     {
         string str = this.txt_vehno.Text.Trim();
         if (str == string.Empty)
         {
             MessageBox.Show("车号为空,请先选发运单,后刷卡!");
         }
         else
         {
             this.card = null;
             ICCard tempCard = this.IC.GetCard(cardid);
             if (tempCard.CardNo == string.Empty)
             {
                 MessageBox.Show("此卡还没有注册!");
             }
             else
             {
                 RFFYD rFFYDByICID = this.cs.GetRFFYDByICID(cardid);
                 if (((rFFYDByICID != null) && (rFFYDByICID.billno != string.Empty)) && (rFFYDByICID.status == "0"))
                 {
                     FrmRFCancel cancel = new FrmRFCancel(rFFYDByICID, tempCard);
                     if (cancel.ShowDialog() == DialogResult.OK)
                     {
                         this.Cards.DeleteCard(cardid);
                     }
                 }
                 else
                 {
                     if (this.chbox_fixveh.Checked)
                     {
                         if (tempCard.Ictype != 2)
                         {
                             MessageBox.Show("当前是固定车辆发运单,请刷多次车辆卡进行确认!");
                             return;
                         }
                         Bill_FixVehCard fixVehCardBillEx = this.IC.GetFixVehCardBillEx(tempCard.DJH.Trim());
                         if (fixVehCardBillEx == null)
                         {
                             MessageBox.Show("获取多次车辆发卡单失败!\r\nIC卡号:" + tempCard.CardNo);
                             return;
                         }
                         if (fixVehCardBillEx.VehID != str)
                         {
                             MessageBox.Show("多次卡的车牌号与单据的车牌号不一致!");
                             return;
                         }
                     }
                     else if (tempCard.Status != 0)
                     {
                         MessageBox.Show("卡" + tempCard.CardNo + "当前状态不允许发卡!");
                         return;
                     }
                     this.card          = tempCard;
                     this.txt_icno.Text = tempCard.CardNo;
                 }
             }
         }
     }
 }