예제 #1
0
 public void btnSave_Click(object sender, EventArgs e)
 {
     string msg = "";
     if (this.txtRemark.Text.Trim().Length > 0x7d0)
     {
         msg = msg + @"备注过长!\n";
     }
     if (msg != "")
     {
         MessageBox.Show(this, msg);
     }
     else
     {
         int num = int.Parse(this.dropStatus.SelectedValue);
         string text = this.txtRemark.Text;
         Maticsoft.BLL.Pay.BalanceDrawRequest request = new Maticsoft.BLL.Pay.BalanceDrawRequest();
         Maticsoft.Model.Pay.BalanceDrawRequest modelByCache = request.GetModelByCache((long) this.JournalNumber);
         if (modelByCache != null)
         {
             modelByCache.RequestStatus = num;
             modelByCache.Remark = text;
             if (request.Update(modelByCache))
             {
                 this.hidColse.Value = "close";
                 DataCache.DeleteCache("BalanceDrawRequestModel-" + this.JournalNumber);
                 MessageBox.ShowSuccessTip(this, "保存成功!");
             }
             else
             {
                 MessageBox.ShowFailTip(this, "保存失败!");
             }
         }
         else
         {
             this.hidColse.Value = "close";
             MessageBox.ShowServerBusyTip(this, "该记录不存在或已被删除!");
         }
     }
 }
예제 #2
0
 private void ShowInfo()
 {
     Maticsoft.Model.Pay.BalanceDrawRequest model = new Maticsoft.BLL.Pay.BalanceDrawRequest().GetModel((long) this.JournalNumber);
     if (model != null)
     {
         this.lblRequestTime.Text = model.RequestTime.ToString("yyyy-MM-dd hh:mm:ss");
         this.lblAmount.Text = model.Amount.ToString("F");
         this.lblUserID.Text = new Users().GetUserName(model.UserID);
         this.lblTrueName.Text = model.TrueName;
         this.lblBankName.Text = model.BankName;
         this.lblBankCard.Text = model.BankCard;
         this.radioCardType.SelectedValue = model.CardTypeID.ToString();
         this.dropStatus.SelectedValue = model.RequestStatus.ToString();
         this.txtRemark.Text = model.Remark;
     }
     else
     {
         this.hidColse.Value = "close";
         MessageBox.ShowServerBusyTip(this, "该记录不存在或已被删除!");
     }
 }