Beispiel #1
0
        private void SaveSetting()
        {
            MailClass mail     = new MailClass();
            string    Username = Request.Cookies["Username"].Value.ToString();

            try
            {
                if (mail.ExtClearSettings(Username))
                {
                    mail.ExtSaveSetting(Username, this.txtTitle1.Text, this.txtEmail1.Text, true, "", "", "", "21", this.txtPopSvrName1.Text, this.txtPopUserName1.Text, (this.txtPopPwd1.Text != "")?this.txtPopPwd1.Text:this.lblPwd1.Value, Int32.Parse(this.txtPort1.Text), this.chkDelSvrMsg1.Checked, this.chkDownNew1.Checked, Int32.Parse(this.txtTimeOut1.Text), 1);
                    mail.ExtSaveSetting(Username, this.txtTitle2.Text, this.txtEmail2.Text, true, "", "", "", "21", this.txtPopSvrName2.Text, this.txtPopUserName2.Text, (this.txtPopPwd2.Text != "")?this.txtPopPwd2.Text:this.lblPwd2.Value, Int32.Parse(this.txtPort2.Text), this.chkDelSvrMsg2.Checked, this.chkDownNew2.Checked, Int32.Parse(this.txtTimeOut2.Text), 2);
                    mail.ExtSaveSetting(Username, this.txtTitle3.Text, this.txtEmail3.Text, true, "", "", "", "21", this.txtPopSvrName3.Text, this.txtPopUserName3.Text, (this.txtPopPwd3.Text != "")?this.txtPopPwd3.Text:this.lblPwd3.Value, Int32.Parse(this.txtPort3.Text), this.chkDelSvrMsg3.Checked, this.chkDownNew3.Checked, Int32.Parse(this.txtTimeOut3.Text), 3);
                }
                else
                {
                    Server.Transfer("../../../Error.aspx");
                }
            }
            catch (Exception ex)
            {
                UDS.Components.Error.Log(ex.ToString());
                Server.Transfer("../../../Error.aspx");
            }
            mail = null;
        }