Beispiel #1
0
 public static data.baseDS.transactionsRow UpdateData(data.baseDS.transactionsRow row)
 {
     data.baseDS.transactionsDataTable tbl = new data.baseDS.transactionsDataTable();
     tbl.ImportRow(row);
     myClient.UpdateTransactions(ref tbl);
     row.AcceptChanges();
     return(tbl[0]);
 }
Beispiel #2
0
 public static void InitData(data.baseDS.transactionsRow row)
 {
     row.stockCode = "";
     row.portfolio = "";
     row.onTime    = DateTime.Today;
     row.tranType  = (byte)AppTypes.TradeActions.None;
     row.qty       = 0; row.amt = 0; row.feeAmt = 0;
     row.status    = (byte)AppTypes.CommonStatus.None;
 }
        public void ViewTransaction()
        {
            if (transactionsSource.Current == null)
            {
                return;
            }
            data.baseDS.transactionsRow row  = (data.baseDS.transactionsRow)((DataRowView)transactionsSource.Current).Row;
            transactionView             form = GetViewForm();

            form.SetEditData(row);
            form.LockEdit(true);
            form.ShowDialog();
        }
Beispiel #4
0
        public virtual void SetEditData(data.baseDS.transactionsRow row)
        {
            transCodeEd.Text    = row.id.ToString();
            codeEd.Text         = row.stockCode;
            onTimeEd.myDateTime = row.onTime;
            portfolioCb.myValue = row.portfolio;
            qtyEd.Value         = row.qty;
            subTotalEd.Value    = row.amt;
            feeAmtEd.Value      = row.feeAmt;
            totalAmtEd.Value    = row.amt + row.feeAmt;
            transTypeCb.myValue = (AppTypes.TradeActions)row.tranType;
            statusCb.myValue    = (AppTypes.CommonStatus)row.status;
            CalculatePriceAndFeePercentage();

            codeEd.Focus();
        }