Example #1
0
        private void gvRecord_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e)
        {
            if (e.Clicks == 2)
            {
                if (e.RowHandle == 0)
                {
                    XtraMessageBox.Show("不能更改最新日志记录,如需修改价格请至通证管理修改");
                    return;
                }

                CurrencyPriceRecordModelGet currencyPriceRecordModelGet = gvRecord.GetFocusedRow() as CurrencyPriceRecordModelGet;
                if (currencyPriceRecordModelGet != null)
                {
                    SubFormPassCardCurrentAmount subFormPassCardCurrentAmount = new SubFormPassCardCurrentAmount();
                    subFormPassCardCurrentAmount.SubformType = SubformType.Edit;
                    CurrencyPriceRecordModelSend currencyPriceRecordModelSend = new CurrencyPriceRecordModelSend();
                    currencyPriceRecordModelSend.Id                           = currencyPriceRecordModelGet.Id;
                    currencyPriceRecordModelSend.Price                        = currencyPriceRecordModelGet.Price;
                    currencyPriceRecordModelSend.UpdateEmployeeId             = LoginedUserInfo.Id;
                    subFormPassCardCurrentAmount.CurrencyPriceRecordModelSend = currencyPriceRecordModelSend;
                    if (subFormPassCardCurrentAmount.ShowDialog() == DialogResult.OK)
                    {
                        currencyPriceRecordModelGet.Price = currencyPriceRecordModelSend.Price;
                        gvRecord.RefreshData();
                    }
                }
            }
        }
Example #2
0
 private void btnUpdateCurrentAmount_Click(object sender, EventArgs e)
 {
     CurrencyInfoModelGet currencyInfoModelGet = gvPassCard.GetFocusedRow() as CurrencyInfoModelGet;
     if (currencyInfoModelGet != null && currencyInfoModelGet.Id == 0)
     {
         SubFormPassCardCurrentAmount subFormPassCardCurrentAmount = new SubFormPassCardCurrentAmount();
         subFormPassCardCurrentAmount.SubformType = SubformType.Insert;
         subFormPassCardCurrentAmount.CurrencyInfoModelGet = currencyInfoModelGet;
         if (subFormPassCardCurrentAmount.ShowDialog() == DialogResult.OK)
         {
             QueryCurrency();
         }
     }
 }