예제 #1
0
        private void AppointmentsDeletedExecute2(DevExpress.XtraScheduler.PersistentObjectCancelEventArgs e)
        {
            string LastMessage;

            Appointment             deletedAppt = e.Object as Appointment;
            IHP_HARMONOGRAM_DZIENNY item        = context.IHP_HARMONOGRAM_DZIENNY.Local.FirstOrDefault(x => x.ID_IHP_HARMONOGRAM_DZIENNY == Convert.ToInt32(deletedAppt.Id));


            if (item != null)
            {
                if (item.IHP_NAGLDOK > 0)
                {
                    MessageBoxService.ShowMessage("WYSTAWIONO ZAMÓWIENIE - NIE MOŻNA USUNĄĆ");
                    e.Cancel = true;
                    return;
                }
                try
                {
                    context.IHP_HARMONOGRAM_DZIENNY.Remove(item);
                    context.SaveChanges();
                }
                catch (Exception ex)
                {
                    LastMessage = ex.ToString();
                    LogManager.WriteLogMessage(LogManager.LogType.Error, LastMessage);
                }
            }
        }
예제 #2
0
    protected void ASPxScheduler1_AppointmentChanging(object sender, DevExpress.XtraScheduler.PersistentObjectCancelEventArgs e)
    {
        Appointment apt = (Appointment)e.Object;

        string[] clientData = apt.Location.Split(new char[] { '-' });
        if (clientData[2].Trim() == "null")
        {
            apt.Subject = apt.Description;
        }
        apt.CustomFields["SZ_PATIENT_ID"] = clientData[2];
        e.Cancel = false;
    }
        private void schedulerStorage1_AppointmentChanging(object sender, DevExpress.XtraScheduler.PersistentObjectCancelEventArgs e)
        {
            string apt_id = string.Empty;

            if (((Appointment)e.Object).Id == null)
            {
                apt_id = "null";
            }
            else
            {
                apt_id = ((Appointment)e.Object).Id.ToString();
            }
            MessageBox.Show("AppointmentChanging event for " + apt_id);
        }
예제 #4
0
    protected void ASPxScheduler1_AppointmentInserting(object sender, DevExpress.XtraScheduler.PersistentObjectCancelEventArgs e)
    {
        Appointment apt = (Appointment)e.Object;

        string[] clientData = apt.Location.Split(new char[] { '-' });
        apt.CustomFields["SZ_PATIENT_ID"] = clientData[2];
        if (clientData[2].Trim() == "null")
        {
            apt.Subject = apt.Description;
        }
        apt.CustomFields["SZ_DOCTOR_ID"]  = clientData[1];
        apt.CustomFields["VISIT_TYPE_ID"] = clientData[0];
        apt.CustomFields["SZ_COMPANY_ID"] = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
        e.Cancel = false;
    }
        private void schedulerStorage1_AppointmentChanging(object sender, DevExpress.XtraScheduler.PersistentObjectCancelEventArgs e)
        {
            DevExpress.XtraScheduler.Appointment apt = e.Object as DevExpress.XtraScheduler.Appointment;
            string id = apt.CustomFields["pkHatirlatma"].ToString();

            if (id != "")
            {
                ArrayList list = new ArrayList();
                list.Add(new SqlParameter("@StartTime", apt.Start));
                list.Add(new SqlParameter("@EndTime", apt.End));
                list.Add(new SqlParameter("@pkHatirlatma", id));
                list.Add(new SqlParameter("@fkDurumu", apt.LabelId));

                DB.ExecuteSQL("update Hatirlatma set fkDurumu=@fkDurumu,Tarih=@StartTime,BitisTarihi=@EndTime where pkHatirlatma=@pkHatirlatma", list);
            }
        }
        private void schedulerStorage1_AppointmentDeleting(object sender, DevExpress.XtraScheduler.PersistentObjectCancelEventArgs e)
        {
            DevExpress.XtraScheduler.Appointment apt = (DevExpress.XtraScheduler.Appointment)e.Object;
            string id = apt.CustomFields["pkHatirlatma"].ToString();

            string sonuc = formislemleri.MesajBox("Randevu Silmek İstediğinize Eminmisiniz?", "Randevu Sil", 1, 2);

            if (sonuc == "0")
            {
                return;
            }

            DB.ExecuteSQL("delete from Hatirlatma where pkHatirlatma=" + id);

            GorunumluHatirlatmalariGetir();
        }