コード例 #1
0
ファイル: MainPage.aspx.cs プロジェクト: ImanRezaeipour/GTS
        protected void userSettingSaveBtn_Click(object sender, EventArgs e)
        {
            BUserSettings bus     = new BUserSettings();
            EmailSettings setting = new EmailSettings()
            {
                Active = true, SendByDay = false, TheHour = "10:00"
            };
            SMSSettings setting1 = new SMSSettings()
            {
                Active = true, SendByDay = true, TheDayHour = "10:00"
            };

            bus.SaveEmailSetting(setting);
            bus.SaveSMSSetting(setting1);
        }
コード例 #2
0
        public void SaveEmailSettings_CurrentUSer()
        {
            base.UpdateCurrentUserPersonId(ADOPerson1.ID);
            EmailSettings emailSet = new EmailSettings();

            emailSet            = busUserSettings.GetEmailSetting();
            emailSet.Active     = true;
            emailSet.SendByDay  = true;
            emailSet.TheDayHour = "13:10";
            emailSet.TheHour    = "10:10";
            emailSet.DayCount   = 5;
            ClearSession();
            busUserSettings.SaveEmailSetting(emailSet);
            ClearSession();
            emailSet = busUserSettings.GetEmailSetting();
            Assert.IsTrue(emailSet.SendByDay);
            Assert.IsTrue(emailSet.Active);
            Assert.AreEqual(790, emailSet.DayHour);
        }