public string aj_MasterUpdate(parm md)
        {
            ResultInfo rAjaxResult = new ResultInfo();
            try
            {
                var open = openLogic();
                using (db0 = open.getDB0)
                {
                    open.setParmValue(ParmDefine.bufferNorth_Max,md.bufferNorth_Max);
                    open.setParmValue(ParmDefine.bufferSouth_Max, md.bufferSouth_Max);
                    open.setParmValue(ParmDefine.N_Max_joinnum, md.N_Max_joinnum);
                    open.setParmValue(ParmDefine.S_Max_joinnum, md.S_Max_joinnum);
                    open.setParmValue(ParmDefine.receiveMails, md.receiveMails);
                    open.setParmValue(ParmDefine.BccMails, md.BccMails);

                }
                rAjaxResult.result = true;
            }
            catch (Exception ex)
            {
                rAjaxResult.result = false;
                rAjaxResult.message = ex.Message;
            }
            return defJSON(rAjaxResult);
        }
        public string aj_init()
        {
            parm r;
                var open = openLogic();
                using (db0 =open.getDB0)
                {
                    //最大申請天數
                    int bufferNorth_Max = (int)open.getParmValue(ParmDefine.bufferNorth_Max);
                    int bufferSouth_Max = (int)open.getParmValue(ParmDefine.bufferSouth_Max);
                    //每日人數限制
                    int N_Max_joinnum = (int)open.getParmValue(ParmDefine.N_Max_joinnum);
                    int S_Max_joinnum = (int)open.getParmValue(ParmDefine.S_Max_joinnum);
                    //信件
                    string receiveMails = (string)open.getParmValue(ParmDefine.receiveMails);
                    string BccMails = (string)open.getParmValue(ParmDefine.BccMails);
                    r = new parm() { bufferNorth_Max=bufferNorth_Max,
                                     bufferSouth_Max=bufferSouth_Max,
                                     N_Max_joinnum=N_Max_joinnum,
                                     S_Max_joinnum=S_Max_joinnum,
                                     receiveMails=receiveMails,
                                     BccMails=BccMails};
                }

            return defJSON(r);
        }
        //[ValidateInput(false)]
        public string aj_MasterUpdate(parm md)
        {
            ResultInfo rAjaxResult = new ResultInfo();
            try
            {
                var open = openLogic();

                using (db0 = getDB0())
                {
                    ////產品規格
                    //open.setParmValue(ParmDefine.surfacehandle, md.surfacehandle);
                    //open.setParmValue(ParmDefine.layer, md.layer);
                    //信件
                    open.setParmValue(ParmDefine.receiveMails, md.receiveMails);
                    //open.setParmValue(ParmDefine.BccMails, md.BccMails);
                }
                rAjaxResult.result = true;
            }
            catch (Exception ex)
            {
                rAjaxResult.result = false;
                rAjaxResult.message = ex.Message;
            }
            return defJSON(rAjaxResult);
        }
        //[ValidateInput(false)]
        public string aj_MasterUpdate(parm md)
        {

            ResultInfo rAjaxResult = new ResultInfo();
            try
            {
                var open = openLogic();
                using (db0 = getDB0())
                {

                    if (System.Globalization.CultureInfo.CurrentCulture.Name == "zh-CN")
                    {
                        open.setParmValue(ParmDefine.receiveMails_cn, md.receiveMails);
                    }
                    else
                    {
                        open.setParmValue(ParmDefine.receiveMails, md.receiveMails);
                    }

                }
                rAjaxResult.result = true;
            }
            catch (Exception ex)
            {
                rAjaxResult.result = false;
                rAjaxResult.message = ex.Message;
            }
            return defJSON(rAjaxResult);
        }
        public string aj_init()
        {
            parm r;
            var open = openLogic();
            using (db0 = getDB0())
            {
                //公司簡介修改
                string receiveMails = string.Empty;
                if (System.Globalization.CultureInfo.CurrentCulture.Name == "zh-CN")
                {
                    receiveMails = (string)open.getParmValue(ParmDefine.receiveMails_cn);
                }
                else
                {
                    receiveMails = (string)open.getParmValue(ParmDefine.receiveMails);
                }

                r = new parm()
                {
                    receiveMails = receiveMails,
                };
            }

            return defJSON(r);
        }
        public string aj_init()
        {
            parm r;
            var open = openLogic();
            using (db0 = getDB0())
            {
                ////產品規格
                //string layer = (string)open.getParmValue(ParmDefine.layer);
                //string surfacehandle = (string)open.getParmValue(ParmDefine.surfacehandle);
                //信件
                string receiveMails = (string)open.getParmValue(ParmDefine.receiveMails);
                //string BccMails = (string)open.getParmValue(ParmDefine.BccMails);

                r = new parm()
                {
                    //surfacehandle=surfacehandle,
                    //layer=layer,
                    receiveMails = receiveMails,
                    //BccMails = BccMails
                };
            }

            return defJSON(r);
        }