Beispiel #1
0
        void DeleteAction_Executing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            bool iscancel = false;

            if (View.SelectedObjects.Cast <Ogrenci>().Where(f => f.Belgeler.Count > 0).Count() > 0)
            {
                iscancel = true;
            }

            if (View.CurrentObject != null && ((Ogrenci)View.CurrentObject).Belgeler.Count > 0)
            {
                iscancel = true;
            }

            if (iscancel)
            {
                WebApplication     application        = WebApplication.Instance;
                IObjectSpace       objectSpace        = application.CreateObjectSpace();
                View               detailView         = application.CreateDetailView(objectSpace, new MessageBoxTextMessage("SÝLÝNMEK ÝSTENÝLEN ÖÐRENCÝ ALTINDA SÝSTEMDE TANIMLI BELGE KAYDI BULUNMAKTADIR. \nÖÐRENCÝYLE BÝRLÝKTE TANIMLI TÜM BELGELERÝ SÝLMEK ÝSTEDÝÐÝNÝZDEN EMÝN MÝSÝNÝZ?"), false);
                ShowViewParameters showViewParameters = new ShowViewParameters(detailView);
                showViewParameters.Context      = TemplateContext.PopupWindow;
                showViewParameters.TargetWindow = TargetWindow.NewModalWindow;
                DialogController h = application.CreateController <DialogController>();
                h.SaveOnAccept   = false;
                h.CanCloseWindow = true;
                h.Accepting     += h_Accepting;
                h.Cancelling    += h_Cancelling;
                showViewParameters.Controllers.Add(h);

                ShowViewSource viewSource = new ShowViewSource(WebWindow.CurrentRequestWindow, null);
                application.ShowViewStrategy.ShowView(showViewParameters, viewSource);
                e.Cancel = true;
            }
        }
Beispiel #2
0
 void newObjectViewController_ObjectCreating(object sender, ObjectCreatingEventArgs e)
 {
     e.ShowDetailView = false;
     // B196715
     if (e.ObjectSpace is INestedObjectSpace)
     {
         e.ObjectSpace = _application.CreateObjectSpace();
     }
 }