private void POGrid_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
 {
     if (sender is GridView gridView)
     {
         if (gridView.GetRow(e.FocusedRowHandle) is PurchaseOrders purchaseOrders)
         {
             UcPODetails.Details(purchaseOrders);
             UcActionGrid.LoadActions(purchaseOrders.Id, "PurchaseOrders");
             ucPOEquipmentProfile1.Details(purchaseOrders.Id, "PurchaseOrders");
             PoId = purchaseOrders.Id;
         }
     }
 }
Beispiel #2
0
 public void Details(Deliveries item)
 {
     txtOffice.Text          = item.Offices?.OfficeName;
     txtChief.Text           = item.Offices?.Chief;
     txtTel.Text             = item.Offices?.TelNo;
     txtSupplierName.Text    = item.Suppliers?.SupplierName;
     txtSupplierAddress.Text = item.Suppliers?.Address;
     txtSupplierTelNo.Text   = item.Suppliers?.ContactNumber;
     lblDelDescription.Text  = item.DeliveryId;
     EquipmentProfileBindingSource.DataSource =
         new UnitOfWork().EquipmentProfilesRepo.Get(m => m.RefId == item.Id && m.TableName == "Deliveries");
     UcActionGrid.LoadActions(item.Id, "Deliveries");
 }
Beispiel #3
0
 public void LoadDocuments()
 {
     try
     {
         if (UcTechSpecGrid.GridView.GetFocusedRow() is TechSpecs item)
         {
             UcActionGrid.LoadActions(item.Id, "TechSpecs");
         }
     }
     catch (Exception e)
     {
         MessageBox.Show(e.Message, "Load Tech Specs", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }