Example #1
0
 public string GetRegistrationConfirm(RegistrationConfirmTemplateBO objTemplate, string TemplatePath)
 {
     if (File.Exists(TemplatePath))
     {
         string fileContent = File.ReadAllText(TemplatePath);
         fileContent = fileContent.Replace("@@EVENTDATE", objTemplate.EventDate);
         fileContent = fileContent.Replace("@@EVENTIME", objTemplate.EventTime);
         fileContent = fileContent.Replace("@@REGISTRANTID", objTemplate.RegistrantID.ToString());
         fileContent = fileContent.Replace("@@TIMEZONE", objTemplate.TimeZoneName);
         fileContent = fileContent.Replace("@@WEBINARID", objTemplate.WebinarID.ToString());
         fileContent = fileContent.Replace("@@WEBINARTITLE", objTemplate.WebinarTitle);
         return fileContent;
     }
     else
         return "";
 }
Example #2
0
        protected void lbtnRegister_Click(object sender, EventArgs e)
        {
            if (hPreview.Value == "0")
            {
                lblEror.Text = "";
                List<Registrants> objReg = objWebinarDA.GetWebinarRegistrantDetail(Convert.ToInt32(hWebinarID.Value), InV3.Text.Trim());
                if (objReg.Count > 0)
                {
                    dvRegForm.Visible = false;
                    dvRegExist.Visible = true;
                    TemplateMgmt objTemplateMgmt = new TemplateMgmt();
                    RegistrationExistTemplateBO objExistBO = new RegistrationExistTemplateBO();
                    objExistBO.RegistrantID = objReg[0].RegistrationID;
                    objExistBO.RegistrantEmail = objReg[0].EmailAddress;
                    objExistBO.RegisteredOn = objReg[0].RegisteredOn;
                    objExistBO.RegisteredFromIP = objReg[0].RegFromIP;
                    ltrExist.Text = objTemplateMgmt.GetRegistrationExist(objExistBO, Constant.DocTemplate + "regExist.tpl");
                }
                else
                {
                    if (objWebinarDA.IsWebinarHostExistDA(Convert.ToInt32(hWebinarID.Value), InV3.Text.Substring(InV3.Text.IndexOf("@") + 1)))
                    {
                        lblEror.Text = objError.getMessage("WB0009");
                    }
                    else
                    {
                        Registrants objRegData = new Registrants();
                        TextBox InputValue;
                        RadComboBox rcmb;
                        string fieldValue;
                        for (int idx = 1; idx < 21; idx++)
                        {
                            fieldValue = "";

                            //if (idx == 8 || idx == 10 || idx == 16)
                            //{
                            //    if ((RadComboBox)this.FindControl("InV" + idx.ToString()) != null)
                            //    {
                            //        rcmb = (RadComboBox)this.FindControl("InV" + idx.ToString());
                            //        fieldValue = rcmb.SelectedValue;
                            //    }
                            //}
                            //else
                            //{
                            if ((TextBox)this.FindControl("InV" + idx.ToString()) != null)
                            {
                                InputValue = (TextBox)this.FindControl("InV" + idx.ToString());
                                fieldValue = InputValue.Text;
                            }
                            //}

                            switch (idx)
                            {
                                case 1:
                                    objRegData.Fld1 = fieldValue;
                                    break;
                                case 2:
                                    objRegData.Fld2 = fieldValue;
                                    break;
                                case 3:
                                    objRegData.Fld3 = fieldValue;
                                    break;
                                case 4:
                                    objRegData.Fld4 = fieldValue;
                                    break;
                                case 5:
                                    objRegData.Fld5 = fieldValue;
                                    break;
                                case 6:
                                    objRegData.Fld6 = fieldValue;
                                    break;
                                case 7:
                                    objRegData.Fld7 = fieldValue;
                                    break;
                                case 8:
                                    objRegData.Fld8 = fieldValue;
                                    break;
                                case 9:
                                    objRegData.Fld9 = fieldValue;
                                    break;
                                case 10:
                                    objRegData.Fld10 = fieldValue;
                                    break;
                                case 11:
                                    objRegData.Fld11 = fieldValue;
                                    break;
                                case 12:
                                    objRegData.Fld12 = fieldValue;
                                    break;
                                case 13:
                                    objRegData.Fld13 = fieldValue;
                                    break;
                                case 14:
                                    objRegData.Fld14 = fieldValue;
                                    break;
                                case 15:
                                    objRegData.Fld15 = fieldValue;
                                    break;
                                case 16:
                                    objRegData.Fld16 = fieldValue;
                                    break;
                                case 17:
                                    objRegData.Fld17 = fieldValue;
                                    break;
                                case 18:
                                    objRegData.Fld18 = fieldValue;
                                    break;
                                case 19:
                                    objRegData.Fld19 = fieldValue;
                                    break;
                                case 20:
                                    objRegData.Fld20 = fieldValue;
                                    break;
                            }
                        }

                        objRegData.webinarID = Convert.ToInt32(hWebinarID.Value);
                        objRegData.RegFromIP = Request.UserHostAddress;
                        int eventRegID = objWebinarDA.SaveWebinarRegistrant(objRegData);
                        updateQAValues(eventRegID);

                        dvRegForm.Visible = false;
                        dvRegConf.Visible = true;

                        TemplateMgmt objTemplateMgmt = new TemplateMgmt();
                        RegistrationConfirmTemplateBO objConfirmBO = new RegistrationConfirmTemplateBO();
                        objConfirmBO.RegistrantID = eventRegID;

                        ltrConf.Text = objTemplateMgmt.GetRegistrationConfirm(objConfirmBO, Constant.DocTemplate + "regConfirm.tpl");
                        //Email confirmation - need to be added here

                        //int eventRegID = objWebinarDA.SaveWebinarEvent(objRegData);
                        //if (dvAdditonalWeb.Visible)
                        //{
                        //    int addEventID = 0;
                        //    foreach (RepeaterItem item in rpRelatedWebinar.Items)
                        //    {
                        //        CheckBox chk = (CheckBox)item.FindControl("chkID");
                        //        if (chk.Checked)
                        //        {
                        //            HiddenField hfld = (HiddenField)item.FindControl("hID");
                        //            objRegData.webinarID = Convert.ToInt32(hfld.Value);
                        //            addEventID = objWebinarDA.SaveWebinarEvent(objRegData);
                        //            // is every webinar confirmation number to be captured and
                        //            // displayed in confirmation page and as well in email
                        //        }
                        //    }
                        //}
                    }
                }
            }
        }