Beispiel #1
0
 private void SelectIndexThread(object id)
 {
     this.Invoke(new Action(() =>
     {
         VipNoBorrow vnBorrowTemp = new VipNoBorrow();
         vnBorrowTemp.BbkId       = (int)id;
         vnBorrowTemp             = vnBorrowBLL.VipNoBorrowSelectByBBKId(vnBorrowTemp);
         BorrowKind borrowKind    = new BorrowKind();
         borrowKind.BkId          = vnBorrowTemp.RkrId;
         txtBorrowKind.Text       = borrowKindBLL.BorrowKindSelectById(borrowKind).BbkName;
         if (vnBorrowTemp.IsNight)
         {
             labNightCost.Text = "包夜租车";
         }
         else
         {
             labNightCost.Text = "";
         }
         txtVNPhone.Text    = vnBorrowTemp.VnPhone;
         txtVNCard.Text     = vnBorrowTemp.VnCard;
         txtBorrowTime.Text = vnBorrowTemp.BbkTime.ToString();
         //txtBBKTime.Text = (DateTime.Now - vnBorrowTemp.BbkTime).ToString().Substring (0,8);
         txtVNNum.Text = vnBorrowTemp.LeftNum.ToString();
         txtMark.Text  = vnBorrowTemp.Mark;
     }));
 }
Beispiel #2
0
 /// <summary>
 /// 填充租车信息
 /// </summary>
 private void FillVipBorrowMessage()
 {
     try
     {
         if (borrowList == null || borrowList.Count == 0)
         {
             DialogResult result = MessageBox.Show("该用户没有需要还的车辆!", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
             if (result == DialogResult.No || result == DialogResult.Yes)
             {
                 isDispose = true;
             }
             this.Close();
             return;
         }
         cmbBorrowTime.DataSource    = borrowList;
         cmbBorrowTime.DisplayMember = "BBKTIME";
         cmbBorrowTime.ValueMember   = "BBKID";
         first = false;
         int           id         = (int)cmbBorrowTime.SelectedValue;
         VipBorrowInfo borrowTemp = new VipBorrowInfo();
         borrowTemp.BbkId = id;
         borrowTemp       = borrowBLL.VipBorrowSelectById(borrowTemp);
         BorrowKind borrowKind = new BorrowKind();
         borrowKind.BkId    = borrowTemp.RkrId;
         txtKind.Text       = borrowKindBLL.BorrowKindSelectById(borrowKind).BbkName;
         txtBorrowNum.Text  = borrowTemp.BbkNumber.ToString();
         txtUnReturn.Text   = borrowTemp.LeftNum.ToString();
         txtBorrowT.Text    = borrowList[0].Times.ToString();
         txtBorrowMark.Text = borrowTemp.Mark;
         if (borrowTemp.IsNight)
         {
             labNightCost.ForeColor = Color.Red;
             labNightCost.Text      = "包夜租车";
         }
         else
         {
             labNightCost.Text = "";
         }
     }
     catch (Exception)
     {
         MessageBox.Show("网络不稳定,请重新加载!");
     }
 }