private void simpleButton11_Click(object sender, EventArgs e)
        {
            frmRandevuVer RandevuVer = new frmRandevuVer();

            if (schedulerControl1.SelectedAppointments.Count > 0)
            {
                DevExpress.XtraScheduler.Appointment apt = null;
                for (int i = 0; i < schedulerControl1.SelectedAppointments.Count; i++)
                {
                    apt = schedulerControl1.SelectedAppointments[i];
                }
                RandevuVer.deRandevuZamani.DateTime = apt.Start;
                RandevuVer.txtPkHatirlatma.Text     = "0";
                RandevuVer.deTarihi.DateTime        = apt.Start;
            }
            else
            {
                RandevuVer.deRandevuZamani.DateTime = schedulerControl1.Start;
                RandevuVer.txtPkHatirlatma.Text     = "0";
                RandevuVer.deTarihi.DateTime        = schedulerControl1.Start;
            }

            RandevuVer.ShowDialog();

            RandevulariYenile();
        }
        private void simpleButton4_Click(object sender, EventArgs e)
        {
            if (xtraTabControl2.SelectedTabPageIndex == 1)
            {
                DevExpress.XtraScheduler.Appointment apt = null;
                for (int i = 0; i < schedulerControl1.SelectedAppointments.Count; i++)
                {
                    apt = schedulerControl1.SelectedAppointments[i];
                }

                if (apt == null)
                {
                    formislemleri.Mesajform("Randevu Seçiniz", "K", 150);
                    return;
                }

                string id = apt.CustomFields["pkHatirlatma"].ToString();
                DB.pkHatirlatma = int.Parse(id);
                DataTable dt = DB.GetData("select * from Hatirlatma with(nolock) where pkHatirlatma=" + id);

                if (dt.Rows.Count == 0)
                {
                    return;
                }

                frmRandevuVer RandevuVer = new frmRandevuVer();
                RandevuVer.txtPkHatirlatma.Text = id;
                RandevuVer.pkFirma.Text         = dt.Rows[0]["fkfirma"].ToString();
                RandevuVer.ShowDialog();
            }
            else if (xtraTabControl2.SelectedTabPageIndex == 0)
            {
                int i = gridView1.FocusedRowHandle;

                if (i < 0)
                {
                    return;
                }

                DataRow dr = gridView1.GetDataRow(gridView1.FocusedRowHandle);
                string  id = dr["pkHatirlatma"].ToString();
                DB.pkHatirlatma = int.Parse(id);
                //if (fkfirma == "") return;

                DataTable dt = DB.GetData("select * from Hatirlatma with(nolock) where pkHatirlatma=" + id);

                if (dt.Rows.Count == 0)
                {
                    return;
                }
                frmRandevuVer rv = new frmRandevuVer();
                rv.pkFirma.Text = dt.Rows[0]["fkfirma"].ToString();
                rv.ShowDialog();
                gridView1.FocusedRowHandle = i;
            }

            RandevulariYenile();
        }
        private void schedulerControl1_EditAppointmentFormShowing(object sender, DevExpress.XtraScheduler.AppointmentFormEventArgs e)
        {
            if (e.Appointment.CustomFields["pkHatirlatma"] == null)
            {
                DB.pkHatirlatma = 0;
                frmRandevuVer RandevuVer = new frmRandevuVer();
                RandevuVer.deRandevuZamani.DateTime = e.Appointment.Start;
                RandevuVer.deTarihi.Tag             = "1";
                RandevuVer.deTarihi.DateTime        = e.Appointment.Start;
                RandevuVer.ShowDialog();
            }
            else
            {
                btnRandevuDegis_Click(sender, e);
            }

            e.Handled = true;
            RandevulariYenile();
        }
Пример #4
0
        private void simpleButton11_Click(object sender, EventArgs e)
        {
            frmRandevuVer RandevuVer = new frmRandevuVer();

            RandevuVer.Show();
        }