WEB/manager/shopping_date_detail.aspx.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using shop.BLL;
using shop.Model;
using shop.Tools;

public partial class back_stage_shopping_date_detail : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string action = Request.QueryString["action"];
            if (action == "update")
            {
                DataRead();
            }
        }
    }

    private void DataRead()
    {
        int id = int.Parse(Request.QueryString["Id"]);
        ShoppingDateBusiness shoppingDateBusiness = new ShoppingDateBusiness();
        ShoppingDate shoppingDate = shoppingDateBusiness.GetEntity(id);
        txtDateType.Text = shoppingDate.DateType;
        txtRemark.Text = shoppingDate.Remark;
    }

    private bool Save()
    {
        ShoppingDateBusiness shoppingDateBusiness = new ShoppingDateBusiness();

        string dateType = txtDateType.Text.Trim();
        string remark = txtRemark.Text.Trim();

        ShoppingDate shoppingDate = new ShoppingDate() { DateType = dateType, Remark = remark };
        return shoppingDateBusiness.Add(shoppingDate);
    }
    private bool Update()
    {
        ShoppingDateBusiness shoppingDateBusiness = new ShoppingDateBusiness();
        int id = int.Parse(Request.QueryString["Id"]);
        string dateType = txtDateType.Text.Trim();
        string remark = txtRemark.Text.Trim();

        ShoppingDate shoppingDate = new ShoppingDate() { Id = id, DateType = dateType, Remark = remark };
        return shoppingDateBusiness.Update(shoppingDate);
    }

后面还有 34 行代码,购买后查看完整代码

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

AI 解读 AI

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

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