using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Globalization;

namespace CheckSheet
{
    public partial class Setup : System.Web.UI.Page
    {


        [System.Web.Services.WebMethod]
        public static string save(string docno,string hostip,string smtp,string email,string password,string port)
        {
            string cmd = string.Empty;
            string strEncriptPassword = clsControlUI.encriptpassword(email, password);
            clsControlUI.WriteSetting("docno", docno);
            clsControlUI.WriteSetting("hostip", hostip);
            clsControlUI.WriteSetting("smtp", smtp);
            clsControlUI.WriteSetting("email", email);
            clsControlUI.WriteSetting("password", strEncriptPassword);
            clsControlUI.WriteSetting("port", port);
            return cmd;


        }

        [System.Web.Services.WebMethod]
        public static string getdata()
        {


            string docno = clsControlUI.GetXML("docno");
            string hostip = clsControlUI.GetXML("hostip");
            string smtp = clsControlUI.GetXML("smtp");
            string email = clsControlUI.GetXML("email");
            string password = clsControlUI.GetXML("password");
            string port = clsControlUI.GetXML("port");

            string strDecriptPassword = clsControlUI.decriptpassword(email, password);

            return docno + '|' + hostip + '|' + smtp + '|' + email + '|' + strDecriptPassword + '|' + port;


        }


        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnback_Click(object sender, EventArgs e)
        {
            Response.Redirect("Menusetting");
        }
    }
}