Hidistro.UI.Web/Admin/Settings/EditShippingTemplate.cs
(开头部分) 11KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
namespace Hidistro.UI.Web.Admin.Settings
{
using Hidistro.ControlPanel.Settings;
using Hidistro.Entities.Settings;
using Hidistro.UI.ControlPanel.Utility;
using Hishop.Components.Validation;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Runtime.CompilerServices;
using System.Web.UI.HtmlControls;
public class EditShippingTemplate : AdminPage
{
private taskMsg TaskMsg;
public string TemplateId;
protected HtmlForm thisForm;
protected EditShippingTemplate() : base("m09", "szp06")
{
this.TaskMsg = new taskMsg();
}
protected void Page_Load(object sender, EventArgs e)
{
this.TemplateId = base.Request["TemplateId"];
if (string.IsNullOrEmpty(this.TemplateId))
{
this.ShowMsg("读取数据异常,无法编辑", false);
}
else
{
string str = base.Request["task"];
if (!string.IsNullOrEmpty(str))
{
if (str == "ReadData")
{
FreightTemplate freightTemplate = SettingsHelper.GetFreightTemplate(int.Parse(this.TemplateId), true);
base.Response.ContentType = "text/json";
base.Response.Write(JsonConvert.SerializeObject(freightTemplate));
base.Response.End();
}
else if (str == "EditSave")
{
this.TaskMsg.state = "faild";
this.TaskMsg.msg = "未知错误";
NameValueCollection form = new NameValueCollection();
form.Add(base.Request.Form);
FreightTemplate template2 = this.ReadPostData(form);
if (this.TaskMsg.state == "success")
{
if (SettingsHelper.UpdateShippingTemplate(template2))
{
this.TaskMsg.msg = "模板修改成功!";
}
else
{
this.TaskMsg.state = "faild";
this.TaskMsg.msg = "模板修改失败:" + SettingsHelper.Error;
后面还有 171 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
