Example #1
0
 public FrmArim()
 {
     InitializeComponent();
     ir = new ir();
     dgvarim.DataSource = arim.GetDataTable();
     SetHeaderColumn();
 }
Example #2
0
 private void dgvarim_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     groupBox1.Visible = true;
     btnOsef.Visible   = false;
     btnAdcen.Visible  = true;
     ir           = new ir(Convert.ToInt32(dgvarim.SelectedRows[0].Cells[0].Value));
     lblKod.Text  = ir.KodIr.ToString();
     txtShem.Text = ir.ShemIr;
 }
Example #3
0
        private void btnMachak_Click(object sender, EventArgs e)
        {
            ir       ir = new ir(Convert.ToInt32(dgvarim.SelectedRows[0].Cells[0].Value));
            DataView dv = new DataView(new asakimTable().GetDataTable());

            dv.RowFilter = "kodIr=" + ir.KodIr;
            if (dv.Count > 0)
            {
                MessageBox.Show("לא ניתן למחוק כיוון שיש רשומות מקושרות");
            }
            ir.Delete();
        }