Пример #1
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            try
            {
                DEWSRMEntities db         = new DEWSRMEntities();
                int[]          selRows    = ((GridView)grdInvFixed.MainView).GetSelectedRows();
                DataRowView    oExpenseID = (DataRowView)(((GridView)grdInvFixed.MainView).GetRow(selRows[0]));

                int nID = Convert.ToInt32(oExpenseID["ID"]);
                ShareInvestmentHead oSIHead = db.ShareInvestmentHeads.FirstOrDefault(p => p.SIHID == nID);

                if (oSIHead == null)
                {
                    MessageBox.Show("select an item to edit", "Item not yet selected", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }

                fInvestmentHead frm = new fInvestmentHead();
                frm.ItemChanged = RefreshFixedList;
                frm.ShowDlg(oSIHead, false, 2);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Пример #2
0
 private void btnNewLiabilityRec_Click(object sender, EventArgs e)
 {
     try
     {
         fInvestmentHead frm = new fInvestmentHead();
         frm.ShowDlg(new ShareInvestmentHead(), true, 2);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Пример #3
0
 private void btnNewLiability_Click(object sender, EventArgs e)
 {
     try
     {
         fInvestmentHead frm = new fInvestmentHead();
         frm.ItemChanged = RefreshLiabilityList;
         frm.ShowDlg(new ShareInvestmentHead(), true, 4);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }