Example #1
0
        private void barButtonItemDeleteDeg_ItemClick(object sender, ItemClickEventArgs e)
        {
            Degree department = bindingSourceDegree.Current as Degree;

            if (department.IsNull())
            {
                Extensions.Extensions.ObjectNotSelectedForDelete();
                return;
            }

            if (Extensions.Extensions.DeletingAlert(department.Name) != DialogResult.Yes)
            {
                return;
            }

            Extensions.Extensions.ShowWaitForm(description: "Departman siliniyor...");
            DegreeSolClient client = Extensions.Extensions.GetDegreeSolClient();

            DegreeService.ProcessResult processResult = client.Delete(department.Id);
            SplashScreenManager.CloseForm(false);
            Extensions.Extensions.ProcessResultMessage(processResult.Errors, (int)processResult.Result);
            if (processResult.Result == DegreeService.ExtensionsBLLResult.Success)
            {
                RefreshData(2);
            }
        }
Example #2
0
        private void barButtonItemEditDeg_ItemClick(object sender, ItemClickEventArgs e)
        {
            Degree degree = bindingSourceDegree.Current as Degree;

            if (degree.IsNull())
            {
                Extensions.Extensions.ObjectNotSelectedForEdit();
                return;
            }

            XtraFormDegree xtraFormDegreedegree = new XtraFormDegree(degree);

            xtraFormDegreedegree.ShowDialog();
            RefreshData(2);
        }