Пример #1
0
 /*работа с интерфейсом*/
 private void btnAdd_Click(object sender, EventArgs e)
 {
     using (dealInterrop = new DealInterrop())
     {
         dealInterrop.ButtonOkClicked += new EventHandler(AddRowDeal);
         dealInterrop.ShowDialog();
     }
 }
Пример #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            using (dealInterrop = new DealInterrop())
            {
                dealInterrop.ButtonOkClicked += new EventHandler(EditRowDeal);
                dealInterrop.FormCaption      = "Редактировать";

                dealInterrop.ContrID    = Convert.ToInt32(gridMain.Rows[gridMain.CurrentCell.RowIndex].Cells[1].Value.ToString());
                dealInterrop.ContrTIN   = gridMain.Rows[gridMain.CurrentCell.RowIndex].Cells[2].Value.ToString();
                dealInterrop.ContrName  = gridMain.Rows[gridMain.CurrentCell.RowIndex].Cells[3].Value.ToString();
                dealInterrop.DealNumber = gridMain.Rows[gridMain.CurrentCell.RowIndex].Cells[4].Value.ToString();
                dealInterrop.DealDate   = Convert.ToDateTime(gridMain.Rows[gridMain.CurrentCell.RowIndex].Cells[5].Value.ToString());
                dealInterrop.DealName   = gridMain.Rows[gridMain.CurrentCell.RowIndex].Cells[6].Value.ToString();
                dealInterrop.DueDate    = Convert.ToInt32(gridMain.Rows[gridMain.CurrentCell.RowIndex].Cells[7].Value.ToString());
                dealInterrop.ShowDialog();
            }
        }