Esempio n. 1
0
 private void btnAddComplaint_Click(object sender, EventArgs e)
 {
     string template = "";
     int id = Convert.ToInt32(ddlComplaintTemplate.SelectedValue.ToString());
     if (id == 0)
     {
         MessageBox.Show("Select template");
     }
     else
     {
         template = new TemplateData().GetComplaintTemplateById(id).ComplaintTemplateText;
     }
     txtComplaint.Text = txtComplaint.Text + " " + template;
     ddlComplaintTemplate.SelectedValue = 0;
 }
Esempio n. 2
0
        public static void PopulateExaminationTemplate(RadDropDownList ddl)
        {
            try
            {
                List<ExaminationTemplate> examination = new TemplateData().GetExaminationTemplate();
                examination.Insert(0, new ExaminationTemplate() { ExaminationTemplateId = 0, ExaminationTemplateName = "Select to add template" });

                ddl.DataSource = examination;
                ddl.ValueMember = "ExaminationTemplateId";
                ddl.DisplayMember = "ExaminationTemplateName";
            }
            catch (Exception x)
            {
                FileLogger.LogError(x);
            }
        }
Esempio n. 3
0
        public static void PopulateComplaintTemplate(RadDropDownList ddl)
        {
            try
            {
                List<ComplaintTemplate> complaints = new TemplateData().GetComplaintTemplate();
                complaints.Insert(0, new ComplaintTemplate() { ComplaintTemplateId = 0, ComplaintTemplateName = "Select to add template" });

                ddl.DataSource = complaints;
                ddl.ValueMember = "ComplaintTemplateId";
                ddl.DisplayMember = "ComplaintTemplateName";
            }
            catch (Exception x)
            {
                FileLogger.LogError(x);
            }
        }