Beispiel #1
0
        protected void RadScheduler1_AppointmentDelete(object sender, SchedulerCancelEventArgs e)
        {
            try
            {
                lblMsg.Text = string.Empty;
                int       iID          = Convert.ToInt32(e.Appointment.ID);
                BEStudent objBEStudent = new BEStudent();
                objBEStudent.IntTransID = iID;
                objBEStudent.IntUserID  = Convert.ToInt32(Session[EnumPageSessions.USERID]);
                BStudent objBStudent = new BStudent();
                objBStudent.BDeleteAppointment(objBEStudent);
                Bind_GetBookedExamSlots();

                if (objBEStudent.DtResult.Rows.Count > 0 && objBEStudent.DtResult != null)
                {
                    if (Convert.ToInt32(objBEStudent.DtResult.Rows[0]["Result"]) != 1)
                    {
                        lblMsg.Text = "<img src='../Images/no.png'align='middle'/>&nbsp;<font color='red'>" + Resources.ResMessages.AppointmentDelete + "</font>";
                    }

                    else
                    {
                        lblMsg.Text = "<img src='../Images/yes.png'align='middle'/>&nbsp;<font color='#00C000'>" + "Exam (Exam ID: " + iID + ")" + Resources.ResMessages.AppointmentDeleteSuccess + "</font>";
                        try
                        {
                            BEMail objBEMail = new BEMail();
                            BMail  objBMail  = new BMail();
                            objBEMail.IntUserID       = 0;
                            objBEMail.IntTransID      = Convert.ToInt64(iID.ToString());
                            objBEMail.StrTemplateName = BaseClass.EnumEmails.ExamCancelConfirmation.ToString();

                            objBMail.BSendEmail(objBEMail);
                        }
                        catch (Exception ex)
                        {
                            throw ex;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }