Example #1
0
        private void bbiChange_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            FrmCreatePermission permission = new FrmCreatePermission();

            if (xtraTabControl1.SelectedTabPage.Text.ToString() == "Tüm İzinler")
            {
                if (!string.IsNullOrEmpty(grdAll.GetFocusedRowCellValue("Ref").ToString()))
                {
                    permission.pRef = int.Parse(grdAll.GetFocusedRowCellValue("pRef").ToString());
                    permission.kRef = int.Parse(grdAll.GetFocusedRowCellValue("Ref").ToString());
                }
            }
            if (xtraTabControl1.SelectedTabPage.Text.ToString() == "Gelecek İzinler")
            {
                if (!string.IsNullOrEmpty(grdNext.GetFocusedRowCellValue("Ref").ToString()))
                {
                    permission.pRef = int.Parse(grdAll.GetFocusedRowCellValue("pRef").ToString());
                    permission.kRef = int.Parse(grdAll.GetFocusedRowCellValue("Ref").ToString());
                }
            }
            if (xtraTabControl1.SelectedTabPage.Text.ToString() == "Aktif İzinler")
            {
                if (!string.IsNullOrEmpty(grdNow.GetFocusedRowCellValue("Ref").ToString()))
                {
                    permission.pRef = int.Parse(grdAll.GetFocusedRowCellValue("pRef").ToString());
                    permission.kRef = int.Parse(grdAll.GetFocusedRowCellValue("Ref").ToString());
                }
            }
            if (xtraTabControl1.SelectedTabPage.Text.ToString() == "Geçmiş İzinler")
            {
                if (!string.IsNullOrEmpty(grdPast.GetFocusedRowCellValue("Ref").ToString()))
                {
                    permission.pRef = int.Parse(grdAll.GetFocusedRowCellValue("pRef").ToString());
                    permission.kRef = int.Parse(grdAll.GetFocusedRowCellValue("Ref").ToString());
                }
            }

            permission.MdiParent = FrmIKMain.ActiveForm;
            permission._FormMod  = Enums.enmFormMod.Guncelle;
            permission.Show();
        }
Example #2
0
 private void bbiAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     Permission.FrmCreatePermission create = new FrmCreatePermission();
     create.MdiParent = FrmIKMain.ActiveForm;
     create.Show();
 }