1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- namespace LYFZ.WeixinServers.WeiXinAPP
- {
- public partial class SetCloudSelectionInterface : System.Web.UI.Page
- {
- LYFZ.WeixinServiceDate.DAL.DAL_SystemConfigure scDal = new WeixinServiceDate.DAL.DAL_SystemConfigure();
- public string NetIPUrl = "";
- protected void Page_Load(object sender, EventArgs e)
- {
- CommonHandler.CheckLoginJump(this);
- LYFZ.WeixinServiceDate.Model.Model_SystemConfigure scModel = scDal.GetModel("CloudSelectionUrl");
- if (!IsPostBack) {
- try
- {
- if (Request.QueryString["ipurl"] != null)
- {
- if (CommonHandler.CheckAdmin(this))
- {
- string ipurl = Request.QueryString["ipurl"].ToString().Trim();
- bool retBl = false;
- if (scModel != null && scModel.ID > 0)
- {
- scModel.Sconfig_Value = ipurl;
- scModel.Sconfig_CreateName = CommonHandler.GetAdminUser(this).Account;
- retBl = scDal.Update(scModel);
- }
- else
- {
- scModel = new WeixinServiceDate.Model.Model_SystemConfigure();
- scModel.Sconfig_Code = "CloudSelectionUrl";
- scModel.Sconfig_Value = ipurl;
- scModel.Sconfig_Name = "云选片接口地址";
- scModel.Sconfig_IsEnabled = true;
- scModel.Sconfig_CreateName = CommonHandler.GetAdminUser(this).Account;
- scModel.Sconfig_CreateDatetime = DateTime.Now;
- retBl = scDal.Add(scModel);
- }
- if (retBl)
- {
- Global.CloudSelectionUrl = ipurl;
- myMsegesBox("保存成功!");
- }
- else
- {
- myMsegesBox("保存失败,请重新");
- }
- }
- }
- }
- catch (Exception ex){
- myMsegesBox("保存失败,原因:"+ex.Message);
- }
- }
- if (scModel != null)
- {
- NetIPUrl = scModel.Sconfig_Value;
- }
- }
- void myMsegesBox(string msg)
- {
- Response.Write("<script>alert('" + msg + "');document.location='SetCloudSelectionInterface.aspx';</script>"); return;
- }
- }
- }
|