public MaintShareTrans(ShareTransaction data)
 {
     InitializeComponent();
     _data = data;
 }
        public static void StoreTransaction(ShareTransaction trans)
        {
            bool newRow = false;
            EMMADataSet.ShareTransactionDataTable table = new EMMADataSet.ShareTransactionDataTable();
            EMMADataSet.ShareTransactionRow row;

            tableAdapter.FillByTransID(table, trans.ID);
            if (table.Count > 0)
            {
                row = table[0];
            }
            else
            {
                row = table.NewShareTransactionRow();
                newRow = true;
            }

            row.CorpID = trans.CorpID;
            row.DeltaQuantity = trans.DeltaQuantity;
            row.DateTime = trans.TransactionDate;
            row.PricePerShare = trans.PricePerShare;
            row.ReportGroupID = trans.ReportGroupID;

            if (newRow)
            {
                table.AddShareTransactionRow(row);
            }

            tableAdapter.Update(table);
        }
 public MaintShareTrans()
 {
     InitializeComponent();
     _data = new ShareTransaction();
 }