Ejemplo n.º 1
0
 public static void InitData(databases.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;
 }
Ejemplo n.º 2
0
        protected void ViewTransaction()
        {
            if (transactionsSource.Current == null)
            {
                return;
            }
            databases.baseDS.transactionsRow row = (databases.baseDS.transactionsRow)((DataRowView)transactionsSource.Current).Row;
            transactionView form = GetViewForm();

            form.SetEditData(row);
            form.LockEdit(true);
            form.ShowDialog();
        }
Ejemplo n.º 3
0
        public virtual void SetEditData(databases.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();
        }