Beispiel #1
0
 private void gridControl1_DoubleClick_1(object sender, EventArgs e)
 {
     if (VendorGridView.SelectedRowsCount > 0)
     {
         var selected = (VendorInfo)VendorGridView.GetRow((int)VendorGridView.GetSelectedRows().GetValue(0));
         if (selected != null)
         {
             _venldor = _context.Vendors.First(ven => ven.VendorId == selected.VendorId);
         }
     }
     OpenSelectedItem();
 }
Beispiel #2
0
 private void gridControl1_Click(object sender, EventArgs e)
 {
     if (VendorGridView.SelectedRowsCount > 0)
     {
         var selected = (VendorInfo)VendorGridView.GetRow((int)VendorGridView.GetSelectedRows().GetValue(0));
         if (selected != null)
         {
             _venldor          = _context.Vendors.FirstOrDefault(ven => ven.VendorId == selected.VendorId);
             btnDelete.Enabled = true;
         }
     }
     AuthorizeForm();
 }
Beispiel #3
0
        public object GetSelectedItem()
        {
            Vendor vendor = null;

            if (VendorGridView.SelectedRowsCount > 0)
            {
                var selected = (VendorInfo)VendorGridView.GetRow((int)VendorGridView.GetSelectedRows().GetValue(0));
                if (null != selected)
                {
                    _venldor = _context.Vendors.First(vn => vn.VendorId == selected.VendorId);
                }
            }
            return(vendor);
        }