private void barButtonEditDish_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     using (AddDishForm addDishForm = new AddDishForm((DishDTO)dishBS.Current, Utils.Operation.Update))
     {
         if (addDishForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             //DetailsDTO return_Id = detailsEditFm.Return();
             //detailsGridView.BeginDataUpdate();
             //LoadData();
             //detailsGridView.EndDataUpdate();
             //int rowHandle = detailsGridView.LocateByValue("Id", return_Id.Id);
             //detailsGridView.FocusedRowHandle = rowHandle;
         }
     }
 }
        private void barButtonAddDish_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            using (AddDishForm addDishForm = new AddDishForm(new DishDTO(), Utils.Operation.Add))
            {
                if (addDishForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    DishDTO return_Id = addDishForm.Return();
                    dishesGridView.BeginDataUpdate();
                    LoadData();
                    dishesGridView.EndDataUpdate();
                    int rowHandle = dishesGridView.LocateByValue("ID", return_Id.ID);
                    dishesGridView.FocusedRowHandle = rowHandle;
                }
            }

            //AddDishForm form = new AddDishForm();
            //form.ShowDialog();
        }