EasyShop/ashx/setDeliverFormula.ashx.cs

(完整代码) 1KB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using conn;
using System.Text;
using System.Data;
using FormatJosn;
using ExeSql;
using System.Data.SqlClient;
using MyModels;

namespace EasyShop.ashx
{
    /// <summary>
    /// setDeliverFormula 的摘要说明
    /// </summary>
    public class setDeliverFormula : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string id = context.Request.Params["id"].ToString();
            string formula = context.Request.Params["formula"].ToString();
            TB_OrderDeliverFee tof = new TB_OrderDeliverFee();
            tof.ProvinceID = int.Parse(id);
            tof.Formula = formula;
            tof.CreateBy=tof.EditBy = MyCookie.getCookie("Id");
            tof.CreateDate=tof.EditDate = DateTime.Now;
            DataSet ds=tof.GetList(" ProvinceID="+id+"");
            int num = ds.Tables[0].Rows.Count;
            int k = 0;
            if (num > 0)//有数据是更新
            {
                k = tof.Update();
            }
            else//无数据时添加
            {
                k = tof.Add();
            }
            string result = "NO";
            if (k > 0)
            {
                result = "OK";
            }
            context.Response.Write(result);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。