예제 #1
0
    public void Start()
    {
        BusinessLogicLayer bll = new BusinessLogicLayer();
        while (true)
        {
            Question question = bll.GetNextQuestion();
            if (question == null)
            {
                break;
            }
            else
            {
                Console.Clear();
                Console.WriteLine($"Question: {question.Statement}");
                Console.WriteLine($"1: {question.Option1}");
                Console.WriteLine($"2: {question.Option2}");
                Console.WriteLine($"3: {question.Option3}");
                Console.WriteLine($"4: {question.Option4}");
                Console.WriteLine($"Marks: {question.Marks}");

                Console.WriteLine("Please enter your response: ");
                int option = Convert.ToInt32(Console.ReadLine());

                bll.Checkresponse(option);

            }

        }
    }
예제 #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            // VeriTabanindaki Cinsiyetleri Combobox1'a Ekler

            bll = new BusinessLogicLayer();
            DataSet ds = bll.getCombo();

            cmbCinsiyet.DataSource = ds.Tables[0];

            cmbCinsiyet.DisplayMember = "CinsiyetAdi";
            cmbCinsiyet.ValueMember   = "CinsiyetId";
            cmbCinsiyet.Text          = "Cinsiyet?";
            // VeriTabanindaki Hediye Amaclarini Combobox2'a Ekler
            // var GelenHediyeAmaci = con.Query<HediyeAmaciTablo>("Select * from HediyeAmaci");
            cmbHediyeAmac.DataSource    = ds.Tables[2];
            cmbHediyeAmac.DisplayMember = "HediyeAmaci";
            cmbHediyeAmac.ValueMember   = "HediyeAmacId";
            cmbHediyeAmac.Text          = "Hediye";
            // VeriTabanindaki Yas Araligini Combobox'3 e Ekler
            //var GelenYasAraligi = con.Query<YasAraligiTablo>("select * from YasAraligi");
            cmbYasAraligi.DataSource    = ds.Tables[3];
            cmbYasAraligi.DisplayMember = "YasAraligi";
            cmbYasAraligi.ValueMember   = "YasId";

            // VeriTabanindaki Burclari Combobox5'e Ekler
            //var GelenBurc = con.Query<BurcTablo>("select * from Burc");
            cmbBurc.DataSource    = ds.Tables[1];
            cmbBurc.DisplayMember = "BurcAdi";
            cmbBurc.ValueMember   = "BurcId";
        }
예제 #3
0
        public void GenerateParagraphs(int number)
        {
            BusinessLogicLayer loremIpsumPage = new BusinessLogicLayer();

            Assert.AreEqual(number, loremIpsumPage.GenerateParagraphs(number, driver)
                            .CountParagraphsInText());
        }
예제 #4
0
        void listeDoldur()
        {
            BusinessLogicLayer bll        = new BusinessLogicLayer();
            List <Personeller> perListesi = bll.PersonelListele();

            dataGridView1.DataSource = perListesi;
        }
예제 #5
0
        public void GenerateCharacters(int characters)
        {
            BusinessLogicLayer loremIpsumPage = new BusinessLogicLayer();

            Assert.AreEqual(characters, loremIpsumPage.GenerateCharacters(characters, driver)
                            .CountCharacters());
        }
예제 #6
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     try
     {
         if (User.Username != null)
         {
             if (BusinessLogicLayer.Adduser(User.Username, User.Password))
             {
                 MessageBox.Show("user added successfully");
             }
             else
             {
                 MessageBox.Show("something went wrong");
             }
         }
         else
         {
             MessageBox.Show("select user to add");
         }
     }
     catch (Exception f)
     {
         MessageBox.Show(f.Message);
     }
 }
예제 #7
0
        public static void AddCheckQuestionAdvanced(BusinessLogicLayer.Entities.FormBuilder.FormField Q, Panel QuestionPanel)
        {
            QuestionPanel.ToolTip = Q.FormFieldType.Name;
             Label QuestionTitle = new Label();
             QuestionTitle.Text = String.Format(@"<span class='fb-Title'>{0}</span>", Q.Title);
             //-----
             Label IsReqired = new Label();
             IsReqired.Text = (Q.IsRequired) ? "*Required" : "";
             //-----
             Label HelpText = new Label();
             HelpText.Text = Q.HelpText;
             //-----
             //Panel AnswerArea = new Panel();
             ASPxListBox chckbx = new ASPxListBox();
             chckbx.SelectionMode = ListEditSelectionMode.CheckColumn;
             chckbx.Width = new Unit(400);
             chckbx.ID = chckbx.ID = "CheckList" + Q.FormFieldId.ToString();
             foreach (BusinessLogicLayer.Entities.FormBuilder.FormFieldValue qa in Q.FormFieldValues)
             {

                 ListEditItem item = new ListEditItem();
                 item.Text = qa.FieldValue;
                 item.Value = qa.FormFieldValueId;
                 chckbx.Items.Add(item);
             }
             if (Q.IsRequired)
             {
                 chckbx.ValidationSettings.CausesValidation = true;
                 chckbx.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.Text;
                 chckbx.ValidationSettings.RequiredField.IsRequired = true;
             }
             //-----
             ControlsAdder(QuestionPanel, QuestionsTemplates.Paragraph, new Control[4] { QuestionTitle, IsReqired, HelpText, chckbx }, new String[4] { "@QuestionTitle", "@IsRequired", "@HelpText", "@AnswerTextBox" });
        }
예제 #8
0
        public static void AddChoiceQuestionAdvanced(BusinessLogicLayer.Entities.FormBuilder.FormField Q, Panel QuestionPanel)
        {
            QuestionPanel.ToolTip = Q.FormFieldType.Name;
             Label QuestionTitle = new Label();
             QuestionTitle.Text = String.Format(@"<span class='fb-Title'>{0}</span>", Q.Title);
             //-----
             Label IsReqired = new Label();
             IsReqired.Text = (Q.IsRequired) ? "*Required" : "";
             //-----
             Label HelpText = new Label();
             HelpText.Text = Q.HelpText;
             //-----

             ASPxRadioButtonList rbl = new ASPxRadioButtonList();
             rbl.ID = "AnswerList" + Q.FormFieldId.ToString();
             rbl.Border.BorderStyle = BorderStyle.None;
             foreach (FormFieldValue qa in Q.FormFieldValues)
             {
                 rbl.Items.Add(new ListEditItem(qa.FieldValue, qa.FormFieldValueId));
             }
             if (Q.IsRequired)
             {
                 rbl.ValidationSettings.CausesValidation = true;
                 rbl.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.Text;
                 rbl.ValidationSettings.RequiredField.IsRequired = true;
             }
             //-----
             ControlsAdder(QuestionPanel, QuestionsTemplates.Paragraph, new Control[4] { QuestionTitle, IsReqired, HelpText, rbl }, new String[4] { "@QuestionTitle", "@IsRequired", "@HelpText", "@AnswerTextBox" });
        }
예제 #9
0
        public void CheckTheNameOfTheHeadlineArticle(string expectedHeadlineArticle)
        {
            BusinessLogicLayer BLL = new BusinessLogicLayer();

            BLL.GoToNewsPageAndCloseSignInWindow();
            BLL.CheckTextOfHeadlineArticleEqualExpectedText(expectedHeadlineArticle);
        }
        void listeDoldur()
        {
            BusinessLogicLayer bll        = new BusinessLogicLayer();
            List <Musteriler>  musListesi = bll.MusteriListele();

            dataGridView1.DataSource = musListesi;
        }
예제 #11
0
        public void CheckFirstArticleUsingCategoryLinkInSearch(string expectedFirstHeadlineFromSearch)
        {
            BusinessLogicLayer BLL = new BusinessLogicLayer();

            BLL.SearchByCategoryLinkOnNewsPage();
            BLL.CheckTextOfFirstArticleOnSearchPageEqualExpectedText(expectedFirstHeadlineFromSearch);
        }
        public void CheckLoremIpsumIsGeneratedWithCorrectSizeOfWords(int words)
        {
            BusinessLogicLayer BLL = new BusinessLogicLayer();

            BLL.GenerateWithParameters("words", words);
            BLL.CheckActualAmountOfWordsGeneratedEqualsExpected(words);
        }
예제 #13
0
        void listeDoldur()
        {
            BusinessLogicLayer bll      = new BusinessLogicLayer();
            List <RehberKayit> rListesi = bll.RehberiListele();

            dataGridView1.DataSource = rListesi;
        }
        public void CheckLoremIpsumIsGeneratedWithCorrectSizeOfBytes(int bytes)
        {
            BusinessLogicLayer BLL = new BusinessLogicLayer();

            BLL.GenerateWithParameters("bytes", bytes);
            BLL.CheckActualAmountOfBytesGeneratedEqualsExpected(bytes);
        }
        public void TestSetup()
        {
            List <Customer>          mockCustomers   = new List <Customer>();
            List <Delivery>          mockDeliveries  = new List <Delivery>();
            Mock <DbSet <Customer> > mockCustomerSet = new Mock <DbSet <Customer> >();
            Mock <DbSet <Delivery> > mockDeliverySet = new Mock <DbSet <Delivery> >();

            mockCustomerSet.As <IQueryable <Customer> >().Setup(m => m.Provider).Returns(new TestDbAsyncQueryProvider <Customer>(mockCustomers.AsQueryable().Provider));
            mockCustomerSet.As <IQueryable <Customer> >().Setup(m => m.Expression).Returns(mockCustomers.AsQueryable().Expression);
            mockCustomerSet.As <IQueryable <Customer> >().Setup(m => m.ElementType).Returns(mockCustomers.AsQueryable().ElementType);
            mockCustomerSet.As <IQueryable <Customer> >().Setup(m => m.GetEnumerator()).Returns(mockCustomers.GetEnumerator());
            mockCustomerSet.As <IDbAsyncEnumerable <Customer> >().Setup(m => m.GetAsyncEnumerator())
            .Returns(new TestDbAsyncEnumerator <Customer>(mockCustomers.GetEnumerator()));

            mockDeliverySet.As <IQueryable <Delivery> >().Setup(m => m.Provider).Returns(new TestDbAsyncQueryProvider <Delivery>(mockDeliveries.AsQueryable().Provider));
            mockDeliverySet.As <IQueryable <Delivery> >().Setup(m => m.Expression).Returns(mockDeliveries.AsQueryable().Expression);
            mockDeliverySet.As <IQueryable <Delivery> >().Setup(m => m.ElementType).Returns(mockDeliveries.AsQueryable().ElementType);
            mockDeliverySet.As <IQueryable <Delivery> >().Setup(m => m.GetEnumerator()).Returns(mockDeliveries.GetEnumerator());
            mockDeliverySet.As <IDbAsyncEnumerable <Delivery> >().Setup(m => m.GetAsyncEnumerator())
            .Returns(new TestDbAsyncEnumerator <Delivery>(mockDeliveries.GetEnumerator()));

            mockCustomerSet.Setup(m => m.Add(It.IsAny <Customer>())).Callback <Customer>(m => mockCustomers.Add(m));
            mockDeliverySet.Setup(m => m.Add(It.IsAny <Delivery>())).Callback <Delivery>(m => mockDeliveries.Add(m));

            mockCustomerSet.Setup(m => m.RemoveRange(It.IsAny <IEnumerable <Customer> >())).Callback <IEnumerable <Customer> >((customerList) => mockCustomers.RemoveAll((m) => true));
            mockDeliverySet.Setup(m => m.RemoveRange(It.IsAny <IEnumerable <Delivery> >())).Callback <IEnumerable <Delivery> >((deliveryList) => mockDeliveries.RemoveAll((x) => true));


            mockContext = new Mock <LilliesContext>();
            mockContext.Setup(m => m.Customers).Returns(mockCustomerSet.Object);
            mockContext.Setup(m => m.Deliveries).Returns(mockDeliverySet.Object);
            controller = new BusinessLogicLayer(mockContext.Object);
        }
        public void CheckUnchekedBoxResultInTextDoesntStartWithLoremIpsum(string start)
        {
            BusinessLogicLayer BLL = new BusinessLogicLayer();

            BLL.GenerateWithUncheckedBox();
            BLL.CheckFirstParagraphDoesntStartWith(start);
        }
        public void CheckHeadLineaArticleName()
        {
            BusinessLogicLayer logic = new BusinessLogicLayer(Driver.DriverInstance);

            logic.GoToTheNewsPage();
            Assert.AreEqual(EXPECTEDHEADLINEARTICLE, logic.GetArticleTitle());
        }
예제 #18
0
        private void satisForm_Load(object sender, EventArgs e)
        {
            bll = new BusinessLogicLayer();

            satis = bll.satis();
            dataGridView1.DataSource = satis;
        }
예제 #19
0
        // POST: Farmer
        public System.Web.Http.IHttpActionResult Post(FarmerModel Farmer)
        {
            DataSet DS = new DataSet();

            DS = BusinessLogicLayer.FARMER_DETAILS_INSERT_UPDATE(Farmer.farmerID, Farmer.name, Farmer.location, Farmer.contactNo, Farmer.panNo, Farmer.bankAccountNo);
            return(Ok());
        }
        public void CheckDefaultSettingResultInTextStartsWithLoremIpsum(string start)
        {
            BusinessLogicLayer BLL = new BusinessLogicLayer();

            BLL.GoToGenerateLoremIpsumPage();
            BLL.CheckFirstParagraphStartsWith(start);
        }
예제 #21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int productId = Int32.Parse(Request.QueryString["productId"]);

            bll  = new BusinessLogicLayer();
            Item = bll.Products.GetSingle(productId);
        }
예제 #22
0
        // GET: Farmer
        public System.Web.Http.IHttpActionResult Get()
        {
            DataSet DS = new DataSet();

            DS = BusinessLogicLayer.GET_FARMER_RELATED_DATA(null);
            return(Ok(DS));
        }
예제 #23
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        BusinessLogicLayer objBLL = new BusinessLogicLayer();

        objBLL.Insert(txtname.Text, txtcity.Text, txtemail.Text);
        GridView1.DataSource = objBLL.Select();
        GridView1.DataBind();
    }
예제 #24
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (BusinessLogicLayer.AdminLogin(tbUsername.Text, tbPassword.Text))
     {
         Home HomePage = new Home();
         HomePage.Show();
     }
 }
예제 #25
0
        public void CheckSecondaryArticleTitles()
        {
            BusinessLogicLayer BLL = new BusinessLogicLayer();

            BLL.GoToNewsPageAndCloseSignInWindow();
            BLL.CheckNumberOfSecondaryArticlesEqualExpectedNumber(_expectedSecondaryArticles);
            BLL.CheckTextOfSecondaryArticlesEqualExpectedText(_expectedSecondaryArticles);
        }
예제 #26
0
        public void CheckErrorMessageWhenUserSubmitQuestionToBBCWithUncheckedAcceptTermsService(string story, string name, string email, string contact, string location, bool over16Box, bool termsBox)
        {
            BusinessLogicLayer BLL = new BusinessLogicLayer();

            BLL.GoToHowToSharePage();
            BLL.SubmitQuestionToBBC(story, name, email, contact, location, over16Box, termsBox);
            BLL.CheckFormWithUncheckedBox("must be accepted");
        }
예제 #27
0
        public void CheckErrorMessageWhenUserSubmitQuestionToBBCWithInvalidEmail(string story, string name, string email, string contact, string location, bool over16Box, bool termsBox)
        {
            BusinessLogicLayer BLL = new BusinessLogicLayer();

            BLL.GoToHowToSharePage();
            BLL.SubmitQuestionToBBC(story, name, email, contact, location, over16Box, termsBox);
            BLL.CheckFormWithInvalidEmail("Email address is invalid");
        }
예제 #28
0
        public void CheckSearchCategoryLink()
        {
            BusinessLogicLayer logic = new BusinessLogicLayer(Driver.DriverInstance);

            logic.GoToTheNewsPage();
            logic.SearchByTheCategoryLink();
            Assert.AreEqual(EXPECTEDARTICLENAME, logic.GetFirstArticleTitle());
        }
예제 #29
0
        public void CheckErrorMessageWhenUserSubmitQuestionToBBCWithEmptyTellUsYourStory(string story, string name, string email, string contact, string location, bool over16Box, bool termsBox)
        {
            BusinessLogicLayer BLL = new BusinessLogicLayer();

            BLL.GoToHowToSharePage();
            BLL.SubmitQuestionToBBC(story, name, email, contact, location, over16Box, termsBox);
            BLL.CheckFormWithEmptyTellUsYourStory("can't be blank");
        }
예제 #30
0
        public void CheckUserImposibilityToSubmitEmptyStory()
        {
            BusinessLogicLayer logic = new BusinessLogicLayer(Driver.DriverInstance);

            logic.GoToYourCoronavirusPageAndClickHowToShare();
            logic.FillInCheckboxes(true, true);
            logic.FillFormAndClickSubmit(EMPTYSTORY);
            Assert.Equals(logic.GetErrorMessage(), "can't be blank");
        }
예제 #31
0
        public void CheckUserImposibilityToSubmitStoryWithoutTermsAccepted()
        {
            BusinessLogicLayer logic = new BusinessLogicLayer(Driver.DriverInstance);

            logic.GoToYourCoronavirusPageAndClickHowToShare();
            logic.FillInCheckboxes(true, false);
            logic.FillFormAndClickSubmit(VALIDDATA);
            Assert.Equals(logic.GetErrorMessage(), "must be accepted");
        }
예제 #32
0
        public void CheckUserImposibilityToSubmitStoryWithInvalidEmail()
        {
            BusinessLogicLayer logic = new BusinessLogicLayer(Driver.DriverInstance);

            logic.GoToYourCoronavirusPageAndClickHowToShare();
            logic.FillInCheckboxes(true, true);
            logic.FillFormAndClickSubmit(INVALIDEMAIL);
            Assert.Equals(logic.GetErrorMessage(), "Email address is invalid");
        }
예제 #33
0
 public static void GeneratePoll(HtmlGenericControl QuestionContainer,BusinessLogicLayer.Entities.FormBuilder.FormDocument document)
 {
     foreach (BusinessLogicLayer.Entities.FormBuilder.FormField field in document.FormFields)
     {
         HtmlGenericControl question = new HtmlGenericControl("div");
         question.Attributes.Add("class", "vote");
         question.ID = "Panel" + field.FormFieldId;
         AddQuestion(field, question);
         QuestionContainer.Controls.Add(question);
     }
 }
예제 #34
0
        public void AddControl(System.Web.UI.HtmlControls.HtmlGenericControl container, BusinessLogicLayer.Entities.ContentManagement.HomePage module,bool isFirst)
        {
            BaseControl control = GetControl(Holders.Page,(ControlType)module.ContentModuleTypeID);

            if (control != null)
            {
                control.ModuleTitle = module.Title;
                control.HomePageID = module.HomePageID;
                control.SectionID = module.SectionID;
                control.IsFirst = isFirst;
                //CurrentContainer = GetContainer((ControlPosition)module.PositionID, module.IsFullWidth);
                container.Controls.Add(control);
            }
        }
예제 #35
0
        public static void CollectChoiceAnswer(ref List<BusinessLogicLayer.Entities.FormBuilder.FormSubmissionAnswer> SurveyUserAnswers, Panel p, BusinessLogicLayer.Entities.FormBuilder.FormField q)
        {
            ASPxRadioButtonList answersArea = ((ASPxRadioButtonList)p.Controls[7]);

             ListEditItem answer = null;
             foreach (ListEditItem li in answersArea.Items)
             {
                 if (li.Selected)
                 {
                     answer = li;
                     break;
                 }
             }
             BusinessLogicLayer.Entities.FormBuilder.FormSubmissionAnswer ua = new FormSubmissionAnswer();
             ua.FormFieldId = q.FormFieldId;
             if (answer != null)
             {
                 ua.FormFieldValueId = Int32.Parse(answer.Value.ToString());
                 ua.Answer = answer.Text;
             }
             SurveyUserAnswers.Add(ua);
        }
예제 #36
0
 public static void CollectDropDownAnswer(ref List<BusinessLogicLayer.Entities.FormBuilder.FormSubmissionAnswer> SurveyUserAnswers, Panel p, BusinessLogicLayer.Entities.FormBuilder.FormField q)
 {
     ASPxComboBox answersArea = ((ASPxComboBox)p.Controls[7]);
      if (answersArea.SelectedIndex >= 0)
      {
          BusinessLogicLayer.Entities.FormBuilder.FormSubmissionAnswer ua = new FormSubmissionAnswer();
          ua.FormFieldId = q.FormFieldId;
          if (answersArea.SelectedItem != null)
          {
              ua.FormFieldValueId = Int32.Parse(answersArea.SelectedItem.Value.ToString());
              ua.Answer = answersArea.Text;
          }
          SurveyUserAnswers.Add(ua);
      }
 }
예제 #37
0
        public static void CollectGridAnswer(ref List<BusinessLogicLayer.Entities.FormBuilder.FormSubmissionAnswer> SurveyUserAnswers, Panel p, BusinessLogicLayer.Entities.FormBuilder.FormField q)
        {
            HtmlTable table = ((HtmlTable)p.Controls[7]);
             for (int i = 1; i < table.Rows.Count; i++)
             {

                 ASPxRadioButtonList answersArea = table.Rows[i].Cells[1].Controls[0] as ASPxRadioButtonList;
                 if (answersArea != null)
                 {
                     ListEditItem answer = null;
                     foreach (ListEditItem li in answersArea.Items)
                     {
                         if (li.Selected)
                         {
                             answer = li;
                             break;
                         }
                     }
                     BusinessLogicLayer.Entities.FormBuilder.FormSubmissionAnswer ua = new FormSubmissionAnswer();
                     ua.FormFieldId = q.FormFieldId;
                     if (answer != null)
                     {
                         string[] sps = answer.Value.ToString().Split('_');
                         ua.FormFieldValueId = Int32.Parse(sps[1]);
                         BusinessLogicLayer.Entities.FormBuilder.FormFieldColumn column = BusinessLogicLayer.Common.FormFieldColumnLogic.GetByID(Convert.ToInt32(sps[0]));
                         if(column != null)
                            ua.Answer = column.FieldColumnValue;
                     }
                     SurveyUserAnswers.Add(ua);
                 }
             }
        }
예제 #38
0
 public static void CollectTextAnswer(ref List<BusinessLogicLayer.Entities.FormBuilder.FormSubmissionAnswer> SurveyUserAnswers, Panel p, BusinessLogicLayer.Entities.FormBuilder.FormField q)
 {
     BusinessLogicLayer.Entities.FormBuilder.FormSubmissionAnswer ua = new FormSubmissionAnswer();
       ua.FormFieldId = q.FormFieldId;
       ua.FormFieldValueId = int.Parse(((ASPxTextBox)p.Controls[7]).ID.Replace("Answer", ""));
       ua.Answer = ((ASPxTextBox)p.Controls[7]).Text.Trim();
       SurveyUserAnswers.Add(ua);
 }
예제 #39
0
        public void AddControl(System.Web.UI.HtmlControls.HtmlGenericControl container, BusinessLogicLayer.Entities.ContentManagement.HomePage module, bool isFirst,bool isInternalBlock)
        {
            BaseControl control = GetControlByID(Holders.Page, module.ContentModuleTypeID);

            if (control != null)
            {
                control.IsInternalBlock = isInternalBlock;
                control.ModuleTitle = module.Title;
                control.HomePageID = module.HomePageID;
                control.SectionID = module.SectionID;
                control.IsFirst = isFirst;
                control.Attributes.Add("rel", module.HomePageID.ToString());
                //CurrentContainer = GetContainer((ControlPosition)module.PositionID, module.IsFullWidth);
                container.Controls.Add(control);
            }
        }
예제 #40
0
        public static void AddCheckQuestionAdvanced(BusinessLogicLayer.Entities.Conference.ConferenceRegistrationType Q, Panel QuestionPanel)
        {
            Table table = new Table();
            table.Style.Add("width", "100%");
            #region Date Row
            TableRow rowDate = new TableRow();
            TableCell cellDate = new TableCell();
            cellDate.ColumnSpan = 2;
            cellDate.Style.Add("font-weight","bold");
            //cellDate.Style.Add("text-align", "center");
            //string hijriDate = "";
            //string miladyDate = "";
            //if(Q.CurrentSchedule != null)
            //{
            //    hijriDate = Code.RbmCommon.ConferenceBasePage.GregToHijri(Q.CurrentSchedule.StartTime);
            //    miladyDate = Q.CurrentSchedule.StartTime.ToShortDateString();
            //}
            //else
            //{
            //    hijriDate = Code.RbmCommon.ConferenceBasePage.GregToHijri(Q.StartDate);
            //    miladyDate = Q.StartDate.ToShortDateString();
            //}
            //cellDate.Text = String.Format("{0} - {1}", miladyDate, hijriDate);
            rowDate.Cells.Add(cellDate);
            table.Rows.Add(rowDate);
            #endregion

            #region Header Row
            TableRow rowHeader = new TableRow();
            rowHeader.Style.Add("background-color", "#18335F");
            rowHeader.Style.Add("color", "#FFFFFF");
            TableCell cellTime = new TableCell();
            //cellTime.Style.Add("text-align", "center");
            cellTime.Style.Add("width", "185px");
            cellTime.Text +=  CommonWeb.Resources.CommonResource.RegistrationForm_Time;
            TableCell cellTitle = new TableCell();
            //cellTitle.Style.Add("text-align", "center");
            cellTitle.Text = Q.DescriptionLanguage;
            rowHeader.Cells.Add(cellTime);
            rowHeader.Cells.Add(cellTitle);
            table.Rows.Add(rowHeader);
            #endregion

            #region Content Row
            TableRow rowContent = new TableRow();
            TableCell cellTimeContent = new TableCell();
            string hijriDate = "";
            string miladyDate = "";
            if (Q.CurrentSchedule != null)
            {
                hijriDate = BasePage.GregToHijri(Q.CurrentSchedule.StartTime);
                miladyDate = Q.CurrentSchedule.StartTime.ToShortDateString();
            }
            else
            {
                hijriDate = BasePage.GregToHijri(Q.StartDate);
                miladyDate = Q.StartDate.ToShortDateString();
            }
            cellTimeContent.Text = String.Format("{0} - {1}<br/>", miladyDate, hijriDate);
            if (Q.CurrentSchedule == null)
                cellTimeContent.Text += "";
            else
            {
                if(Q.LanguageID == 2)
                    cellTimeContent.Text += Q.CurrentSchedule.StartTime.ToShortTimeString().Replace("AM", "ص").Replace("PM", "م") + " - " + Q.CurrentSchedule.EndTime.ToShortTimeString().Replace("AM", "ص").Replace("PM", "م");
                else
                    cellTimeContent.Text += Q.CurrentSchedule.StartTime.ToShortTimeString() + " - " + Q.CurrentSchedule.EndTime.ToShortTimeString();
            }
            TableCell cellTitleContent = new TableCell();
            cellTitleContent.Style.Add("text-align", CommonWeb.Resources.CommonResource.Direction);
            cellTitleContent.Style.Add("font-weight", "bold");
            ASPxCheckBox checkBox = new ASPxCheckBox();
            checkBox.Text = Q.NameLanguage;
            checkBox.ID = "CheckList" + Q.ConferenceRegistrationTypeId;
            if (Q.MustRegister)
            {
                checkBox.ValidationSettings.CausesValidation = true;
                checkBox.ValidationSettings.Display = Display.Dynamic;
                checkBox.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.Text;
                checkBox.ValidationSettings.RequiredField.ErrorText = "*";
                checkBox.ValidationSettings.RequiredField.IsRequired = true;
                checkBox.ValidationSettings.ValidationGroup = "WizardValidation";
            }
            cellTitleContent.Controls.Add(checkBox);
            rowContent.Cells.Add(cellTimeContent);
            rowContent.Cells.Add(cellTitleContent);
            table.Rows.Add(rowContent);
            #endregion

            QuestionPanel.Controls.Add(table);
        }
예제 #41
0
 public static void AddQuestionAdvanced(BusinessLogicLayer.Entities.FormBuilder.FormField Q, Panel QuestionPanel)
 {
     if (Q.FormFieldType.Name == "Text")
      {
          AddTextQuestionAdvanced(Q, QuestionPanel);
      }
      else if (Q.FormFieldType.Name == "Paragraph")
      {
          AddParagraphQuestionAdvanced(Q, QuestionPanel);
      }
      else if (Q.FormFieldType.Name == "Check")
      {
          AddCheckQuestionAdvanced(Q, QuestionPanel);
      }
      else if (Q.FormFieldType.Name == "Choice")
      {
          AddChoiceQuestionAdvanced(Q, QuestionPanel);
      }
      else if (Q.FormFieldType.Name == "DropDown")
      {
          AddDropDownQuestionAdvanced(Q, QuestionPanel);
      }
      else if (Q.FormFieldType.Name == "Grid")
      {
          AddGridQuestionAdvanced(Q, QuestionPanel);
      }
 }
예제 #42
0
        private static void CollectChoiceAnswer(ref List<BusinessLogicLayer.Entities.FormBuilder.FormSubmissionAnswer> SurveyUserAnswers, HtmlGenericControl p, BusinessLogicLayer.Entities.FormBuilder.FormField q)
        {
            HtmlGenericControl answersArea = p.Controls[5] as HtmlGenericControl;
            //HtmlGenericControl AnswerArea = new HtmlGenericControl("div");
            if (answersArea == null) return;

            foreach (HtmlGenericControl li in answersArea.Controls)
            {
                RadioButton answer = li.Controls[0] as RadioButton;
                if (answer != null && answer.Checked)
                {

                    BusinessLogicLayer.Entities.FormBuilder.FormSubmissionAnswer ua = new FormSubmissionAnswer();
                    ua.FormFieldId = q.FormFieldId;
                    ua.FormFieldValueId = Int32.Parse(answer.ID.ToString().Replace("CheckAnswer", ""));
                    ua.Answer = answer.Text;
                    SurveyUserAnswers.Add(ua);
                    //break;
                }
            }
        }
예제 #43
0
        public static void AddQuestion(BusinessLogicLayer.Entities.FormBuilder.FormField Q , Panel QuestionPanel)
        {
            if (Q.FormFieldType.Name == "Text")
             {
                 QuestionPanel.ToolTip = Q.FormFieldType.Name;
                 Label QuestionTitle = new Label();
                 QuestionTitle.Text = @"<span style='font-size:large;font-weight:bold'>"+ Q.Title +"</span>";

                 //-----
                 Label IsReqired = new Label();
                 IsReqired.Text = (Q.IsRequired) ? "*Required" : "";
                 //-----
                 Label HelpText = new Label();
                 HelpText.Text = Q.HelpText != null ? Q.HelpText : "";
                 //-----
                 TextBox txtAnswer = new TextBox();
                 txtAnswer.ID = String.Format("Answer{0}", Q.FormFieldValues[0].FormFieldValueId);
                 //-----
                 ControlsAdder(QuestionPanel, QuestionsTemplates.Text, new Control[4] {QuestionTitle, IsReqired, HelpText, txtAnswer }, new String[4] { "@QuestionTitle", "@IsRequired", "@HelpText", "@AnswerTextBox" });
             }

             else if (Q.FormFieldType.Name == "Paragraph")
             {
                 QuestionPanel.ToolTip = Q.FormFieldType.Name;
                 Label QuestionTitle = new Label();
                 QuestionTitle.Text = @"<span style='font-size:large;font-weight:bold'>" + Q.Title + "</span>";
                 //-----
                 Label IsReqired = new Label();
                 IsReqired.Text = (Q.IsRequired) ? "*Required" : "";
                 //-----
                 Label HelpText = new Label();
                 HelpText.Text = Q.HelpText;
                 //-----
                 TextBox txtAnswer = new TextBox();
                 txtAnswer.ID  = String.Format("Answer{0}", Q.FormFieldValues[0].FormFieldValueId);
                 txtAnswer.TextMode = TextBoxMode.MultiLine;
                 txtAnswer.Width = new Unit(400);
                 txtAnswer.Height = new Unit(100);
                 //-----
                 ControlsAdder(QuestionPanel, QuestionsTemplates.Paragraph, new Control[4] { QuestionTitle, IsReqired, HelpText, txtAnswer }, new String[4] { "@QuestionTitle", "@IsRequired", "@HelpText", "@AnswerTextBox" });
             }

             else if (Q.FormFieldType.Name  == "Check")
             {
                 QuestionPanel.ToolTip = Q.FormFieldType.Name;
                 Label QuestionTitle = new Label();
                 QuestionTitle.Text = @"<span style='font-size:large;font-weight:bold'>" + Q.Title + "</span>";
                 //-----
                 Label IsReqired = new Label();
                 IsReqired.Text = (Q.IsRequired) ? "*Required" : "";
                 //-----
                 Label HelpText = new Label();
                 HelpText.Text = Q.HelpText;
                 //-----
                 Panel AnswerArea = new Panel();

                 foreach (BusinessLogicLayer.Entities.FormBuilder.FormFieldValue qa in Q.FormFieldValues)
                 {
                     CheckBox chckbx = new CheckBox();
                     chckbx.ID = "CheckAnswer"+qa.FormFieldValueId.ToString();
                     chckbx.Text = qa.FieldValue;
                     chckbx.Width = new Unit(100, UnitType.Percentage);
                     AnswerArea.Controls.Add(chckbx);
                     AddTextToPanel(AnswerArea, "<br/>");
                 }
                 //-----
                 ControlsAdder(QuestionPanel, QuestionsTemplates.Paragraph, new Control[4] { QuestionTitle, IsReqired, HelpText, AnswerArea }, new String[4] { "@QuestionTitle", "@IsRequired", "@HelpText", "@AnswerTextBox" });
             }

             else if (Q.FormFieldType.Name == "Choice")
             {
                 QuestionPanel.ToolTip = Q.FormFieldType.Name;
                 Label QuestionTitle = new Label();
                 QuestionTitle.Text = @"<span style='font-size:large;font-weight:bold'>" + Q.Title + "</span>";
                 //-----
                 Label IsReqired = new Label();
                 IsReqired.Text = (Q.IsRequired) ? "*Required" : "";
                 //-----
                 Label HelpText = new Label();
                 HelpText.Text = Q.HelpText;
                 //-----

                 RadioButtonList rbl = new RadioButtonList();
                 rbl.ID = "AnswerList"+Q.FormFieldId.ToString();
                 foreach (FormFieldValue qa in Q.FormFieldValues)
                 {
                     rbl.Items.Add(new ListItem(qa.FieldValue, qa.FormFieldValueId.ToString()));
                 }

                 //-----
                 ControlsAdder(QuestionPanel, QuestionsTemplates.Paragraph, new Control[4] { QuestionTitle, IsReqired, HelpText, rbl }, new String[4] { "@QuestionTitle", "@IsRequired", "@HelpText", "@AnswerTextBox" });
             }
        }
예제 #44
0
        private static void AddQuestion(BusinessLogicLayer.Entities.FormBuilder.FormField Q, HtmlGenericControl QuestionPanel)
        {
            if (Q.FormFieldType.Name == "Check")
            {
                QuestionPanel.Attributes.Add("rel",Q.FormFieldType.Name);
                AddTextToPanel(QuestionPanel, Q.Title);
                //Label QuestionTitle = new Label();
                //QuestionTitle.Text = Q.Title;
                ////-----
                //Label IsReqired = new Label();
                //IsReqired.Text = (Q.IsRequired) ? "*Required" : "";
                ////-----
                //Label HelpText = new Label();
                //HelpText.Text = Q.HelpText;
                //-----
                HtmlGenericControl AnswerArea = new HtmlGenericControl("div");
                AnswerArea.Attributes.Add("class", "vote");
                //Panel AnswerArea = new Panel();

                foreach (BusinessLogicLayer.Entities.FormBuilder.FormFieldValue qa in Q.FormFieldValues)
                {
                    HtmlGenericControl contDiv = new HtmlGenericControl("div");
                    contDiv.Attributes.Add("class", "row");

                    CheckBox chckbx = new CheckBox();
                    chckbx.ID = "CheckAnswer" + qa.FormFieldValueId.ToString();
                    chckbx.Text = qa.FieldValue;
                    chckbx.Width = new Unit(100, UnitType.Percentage);
                    contDiv.Controls.Add(chckbx);
                    AnswerArea.Controls.Add(contDiv);
                    //AddTextToPanel(AnswerArea, "<br/>");
                }
                QuestionPanel.Controls.Add(AnswerArea);
                //-----
                //ControlsAdder(QuestionPanel, QuestionsTemplates.Check, new Control[2] { QuestionTitle, AnswerArea }, new String[2] { "@QuestionTitle", "@AnswerTextBox" });
            }

            else if (Q.FormFieldType.Name == "Choice")
            {
                QuestionPanel.Attributes.Add("rel", Q.FormFieldType.Name);
                AddTextToPanel(QuestionPanel, Q.Title);
                //-----
                //Label IsReqired = new Label();
                //IsReqired.Text = (Q.IsRequired) ? "*Required" : "";
                ////-----
                //Label HelpText = new Label();
                //HelpText.Text = Q.HelpText;
                ////-----
                HtmlGenericControl AnswerArea = new HtmlGenericControl("div");
                AnswerArea.Attributes.Add("class", "vote");

                foreach (BusinessLogicLayer.Entities.FormBuilder.FormFieldValue qa in Q.FormFieldValues)
                {
                    HtmlGenericControl contDiv = new HtmlGenericControl("div");
                    contDiv.Attributes.Add("class", "row");
                    RadioButton chckbx = new RadioButton();
                    chckbx.GroupName = "ChoiceAnswer" + Q.FormFieldId;
                    chckbx.ID = "ChoiceAnswer" + qa.FormFieldValueId.ToString();
                    chckbx.Text = qa.FieldValue;

                    chckbx.Width = new Unit(100, UnitType.Percentage);
                    contDiv.Controls.Add(chckbx);
                    AnswerArea.Controls.Add(contDiv);
                    //AddTextToPanel(AnswerArea, "<br/>");
                }

                //RadioButtonList rbl = new RadioButtonList();
                //rbl.ID = "AnswerList" + Q.FormFieldId.ToString();
                //foreach (FormFieldValue qa in Q.FormFieldValues)
                //{
                //    rbl.Items.Add(new ListItem(qa.FieldValue, qa.FormFieldValueId.ToString()));

                //}

                //-----
                QuestionPanel.Controls.Add(AnswerArea);
                //ControlsAdder(QuestionPanel, QuestionsTemplates.Choice, new Control[2] { QuestionTitle, AnswerArea }, new String[2] { "@QuestionTitle", "@AnswerTextBox" });
            }
        }
예제 #45
0
        public static bool SendSubmitAbstractEmail(Page currentPage, BusinessLogicLayer.Entities.Conference.Abstracts abstracts, MemoryStream stream)
        {
            string tmplName = "FinalSubmitAbstractTemplate.html", tmpl = string.Empty;

            try
            {
                tmpl = getEmailTemplate(currentPage, tmplName);
            }
            catch
            {
                // error loading template file
                throw new Exception(string.Format("Can't open template file ({0}), make sure that the file exists in the 'EmailTemplates' path defined in web.config ", tmplName));
            }
            tmpl = tmpl.Replace("##DATE##", DateTime.Now.ToLongDateString());
            tmpl = tmpl.Replace("##CITY##", abstracts.MainAuthor.City);
            tmpl = tmpl.Replace("##COUNTRY##", abstracts.MainAuthor.Country);
            tmpl = tmpl.Replace("##PHONENUMBER##", String.Format("{0} - {1}", abstracts.MainAuthor.PhoneNumberAreaCode, abstracts.MainAuthor.PhoneNumber));
            // replace ##xxx## with appropriate values
            tmpl = tmpl.Replace("##NAME##", abstracts.AuthorContactName);
            tmpl = tmpl.Replace("##NAMEFULL##", abstracts.AuthorContactNameFull);
            tmpl = tmpl.Replace("##ABSTRACTNUMBER##", abstracts.ABCode);
            tmpl = tmpl.Replace("##CATEGORY##", abstracts.CurrentConferenceCategory.CategoryName);
            tmpl = tmpl.Replace("##TITLE##", abstracts.AbstractTitle);
            tmpl = tmpl.Replace("##AUTHORS##", abstracts.AbstractAuthors);
            // send email
            if (sendMail(tmpl, "Confirmation of abstract receipt By Qiyas #" + abstracts.ABCode, abstracts.MainAuthor.Email, currentPage, "", stream))
                return true;

            return false;
        }
예제 #46
0
        public static void SetChoiceAnswerValue(Panel p, BusinessLogicLayer.Entities.Conference.ConferenceRegistrationType q)
        {
            Table table = ((Table)p.Controls[0]);
            TableRow row = table.Rows[2];
            TableCell cell = row.Cells[1];

            ASPxRadioButton answersArea = ((ASPxRadioButton)cell.Controls[0]);
            answersArea.Checked = true;
        }
예제 #47
0
        public static void CollectChoiceAnswer(ref List<BusinessLogicLayer.Entities.Conference.ConferenceRegistrationItems> SurveyUserAnswers, Panel p, BusinessLogicLayer.Entities.Conference.ConferenceRegistrationType q)
        {
            Table table = ((Table)p.Controls[0]);
            TableRow row = table.Rows[2];
            TableCell cell = row.Cells[1];

            ASPxRadioButton answersArea = ((ASPxRadioButton)cell.Controls[0]);
            if (answersArea.Checked)
            {
                BusinessLogicLayer.Entities.Conference.ConferenceRegistrationItems item = new BusinessLogicLayer.Entities.Conference.ConferenceRegistrationItems();
                item.ConferenceRegistrationTypeID = q.ConferenceRegistrationTypeId;
                item.CreatedDate = DateTime.Now;
                SurveyUserAnswers.Add(item);
            }
        }
예제 #48
0
 public static void AddQuestionAdvanced(BusinessLogicLayer.Entities.Conference.ConferenceRegistrationType Q, Panel QuestionPanel)
 {
     if (string.IsNullOrEmpty(Q.GroupName))
     {
         AddCheckQuestionAdvanced(Q, QuestionPanel);
     }
     else
     {
         AddChoiceQuestionAdvanced(Q, QuestionPanel);
     }
 }
예제 #49
0
        public static void AddTextQuestionAdvanced(BusinessLogicLayer.Entities.FormBuilder.FormField Q, Panel QuestionPanel)
        {
            QuestionPanel.ToolTip = Q.FormFieldType.Name;
             Label QuestionTitle = new Label();
             QuestionTitle.Text = String.Format(@"<span class='fb-Title'>{0}</span>", Q.Title);

             //-----
             Label IsReqired = new Label();
             IsReqired.Text = (Q.IsRequired) ? "*Required" : "";
             //-----
             Label HelpText = new Label();
             HelpText.Text = Q.HelpText;
             //-----
             ASPxTextBox txtAnswer = new ASPxTextBox();
             txtAnswer.ID = String.Format("Answer{0}", Q.FormFieldValues[0].FormFieldValueId);
             txtAnswer.Width = new Unit(250);
             if (Q.IsRequired)
             {
                 txtAnswer.ValidationSettings.CausesValidation = true;
                 txtAnswer.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.Text;
                 txtAnswer.ValidationSettings.RequiredField.IsRequired = true;
             }
             //-----
             ControlsAdder(QuestionPanel, QuestionsTemplates.Text, new Control[4] { QuestionTitle, IsReqired, HelpText, txtAnswer }, new String[4] { "@QuestionTitle", "@IsRequired", "@HelpText", "@AnswerTextBox" });
        }
예제 #50
0
 public MessagesController()
 {
     bLLayer = new BusinessLogicLayer();
 }
예제 #51
0
 public ListItemsControl(List<BusinessLogicLayer.Entities.ContentManagement.Article> articles, BusinessLogicLayer.Entities.ContentManagement.HomePage homePage)
 {
     Articles = articles;
     HomePage = homePage;
 }
예제 #52
0
        public static void AddGridQuestionAdvanced(BusinessLogicLayer.Entities.FormBuilder.FormField Q, Panel QuestionPanel)
        {
            QuestionPanel.ToolTip = Q.FormFieldType.Name;
             Label QuestionTitle = new Label();
             QuestionTitle.Text = String.Format(@"<span class='fb-Title'>{0}</span>", Q.Title);
             //-----
             Label IsReqired = new Label();
             IsReqired.Text = (Q.IsRequired) ? "*Required" : "";
             //-----
             Label HelpText = new Label();
             HelpText.Text = Q.HelpText;
             HtmlTable table = new HtmlTable();
             int counter = 1;
             #region Header Row
             HtmlTableRow row = new HtmlTableRow();
             row.ID = "RowHeader" + Q.FormFieldId;
             HtmlTableCell cellInit1 = new HtmlTableCell();
             HtmlTableCell cellInit2 = new HtmlTableCell();
             HtmlTableCell cellInit3 = new HtmlTableCell();
             cellInit1.Attributes.Add("class", "ss-gridnumbers");
             cellInit2.Attributes.Add("class", "ss-gridnumbers ss-spacer");
             cellInit2.Attributes.Add("style", "width: 6.25%;");
             row.Cells.Add(cellInit1);
             //row.Cells.Add(cellInit2);
             foreach (BusinessLogicLayer.Entities.FormBuilder.FormFieldColumn column in Q.FormFieldColumns)
             {
                 HtmlTableCell cell = new HtmlTableCell();
                 cell.Attributes.Add("class", "ss-gridnumbers");
                 cell.Attributes.Add("style", "width: 12.5%;");
                 Label label = new Label();
                 label.CssClass = "ss-gridnumber";
                 label.Text = column.FieldColumnValue;
                 cell.Controls.Add(label);
                 row.Cells.Add(cell);
             }

             table.Rows.Add(row);
             #endregion

             #region Content Rows
             foreach (FormFieldValue qa in Q.FormFieldValues)
             {
                 HtmlTableRow bodyRow = new HtmlTableRow();
                 bodyRow.ID = "Row" + qa.FormFieldValueId.ToString();
                 if(counter % 2 == 0)
                     bodyRow.Attributes.Add("class", "ss-gridrow ss-grid-row-odd");
                 else
                     bodyRow.Attributes.Add("class", "ss-gridrow ss-grid-row-even");
                 HtmlTableCell cellMain = new HtmlTableCell();
                 cellMain.Attributes.Add("class", "ss-gridrow ss-leftlabel");
                 cellMain.InnerText = qa.FieldValue;
                 bodyRow.Cells.Add(cellMain);
                 //HtmlTableCell cellSpacer = new HtmlTableCell();
                 //cellSpacer.Attributes.Add("class", "ss-gridrow ss-spacer");
                 //cellSpacer.Attributes.Add("style", "width: 6.25%;");
                 //bodyRow.Cells.Add(cellSpacer);
                 HtmlTableCell cellContent = new HtmlTableCell();
                 cellContent.ColSpan = Q.FormFieldColumns.Count;
                 ASPxRadioButtonList rbl = new ASPxRadioButtonList();
                 rbl.ID = String.Format("GridColumnList_{0}_{1}", counter, Q.FormFieldId);
                 rbl.RepeatColumns = Q.FormFieldColumns.Count;
                 rbl.Width = new Unit("100%");
                 rbl.Border.BorderStyle = BorderStyle.None;
                 if (Q.IsRequired)
                 {
                     rbl.ValidationSettings.CausesValidation = true;
                     rbl.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.Text;
                     rbl.ValidationSettings.RequiredField.IsRequired = true;
                 }
                 foreach (BusinessLogicLayer.Entities.FormBuilder.FormFieldColumn column in Q.FormFieldColumns)
                 {

                     rbl.Items.Add(new ListEditItem("", String.Format("{0}_{1}", column.FormFieldColumnId, qa.FormFieldValueId)));
                 }
                 cellContent.Controls.Add(rbl);
                 bodyRow.Cells.Add(cellContent);
                 table.Rows.Add(bodyRow);
                 counter++;
             }
             #endregion

             //-----
             ControlsAdder(QuestionPanel, QuestionsTemplates.Paragraph, new Control[4] { QuestionTitle, IsReqired, HelpText, table}, new String[4] { "@QuestionTitle", "@IsRequired", "@HelpText", "@AnswerTextBox" });
        }
예제 #53
0
        public static bool SendUserSendEmailWithContent(Page currentPage, BusinessLogicLayer.Entities.Conference.Abstracts abstracts, string Title, string Subject, string Email, MemoryStream contents)
        {
            string tmplName = "UserSendEmail.htm", tmpl = string.Empty;

            try
            {
                tmpl = getEmailTemplate(currentPage, tmplName);
            }
            catch
            {
                // error loading template file
                throw new Exception(string.Format("Can't open template file ({0}), make sure that the file exists in the 'EmailTemplates' path defined in web.config ", tmplName));
            }

            tmpl = tmpl.Replace("##DATE##", DateTime.Now.ToLongDateString());
            tmpl = tmpl.Replace("##CITY##", abstracts.MainAuthor.City);
            tmpl = tmpl.Replace("##COUNTRY##", abstracts.MainAuthor.Country);
            tmpl = tmpl.Replace("##PHONENUMBER##", String.Format("{0} - {1}", abstracts.MainAuthor.PhoneNumberAreaCode, abstracts.MainAuthor.PhoneNumber));
            // replace ##xxx## with appropriate values
            tmpl = tmpl.Replace("##NAME##", abstracts.AuthorContactName);
            tmpl = tmpl.Replace("##NAMEFULL##", abstracts.AuthorContactNameFull);
            tmpl = tmpl.Replace("##TITLE##", abstracts.AbstractTitle);
            tmpl = tmpl.Replace("##CODE##", abstracts.AbstractTitle);
            tmpl = tmpl.Replace("##CONTENT##", Subject);
            // send email

            if (sendMail(tmpl, Title, Email, currentPage, "", contents))
                return true;

            return false;
        }