Web/Admin/Pictures/EditPrice.aspx.cs

(开头部分) 2KB

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

using System;
using System.IO;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Common;

namespace Web.Admin.Pictures
{
    public partial class EditPrice : Web.UI.ManagePage
    {
        public int Id;
        public int ProId;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!int.TryParse(Request.Params["id"] as string, out this.Id))
            {
                JscriptMsg(350, 230, "错误提示", "<b>出现错误啦!</b>您要修改的信息不存在或参数不正确。", "back", "Error");
                return;
            }
            if (!int.TryParse(Request.Params["ProId"] as string, out this.ProId))
            {
                JscriptMsg(350, 230, "错误提示", "<b>出现错误啦!</b>您要修改的信息不存在或参数不正确。", "back", "Error");
                return;
            }
            if (!Page.IsPostBack)
            {
                chkLoginLevel("editPictures");
                ShowInfo(this.Id);
            }
        }
        //赋值操作
        private void ShowInfo(int _id)
        {
            BLL.ProductPrice bllprice = new BLL.ProductPrice();
            Model.ProductPrice modelprice = bllprice.GetModel(_id);
            txtColor.Text = modelprice.Title;
            txtPrice.Text = modelprice.Price.ToString();
            BLL.Pictures bll = new BLL.Pictures();
            Model.Pictures model = bll.GetModel(modelprice.ProId);
            txtTitle.Text = model.Title;
            dPriceTitle.SelectedValue = modelprice.PriceTitle;
            dOriginalPriceTitle.SelectedValue = modelprice.OriginalPriceTitle;
            txtOriginalPrice.Text = modelprice.OriginalPrice;

        }
        //保存
        protected void btnSave_Click(object sender, EventArgs e)
        {
            Model.ProductPrice model = new Model.ProductPrice();
            BLL.ProductPrice bll = new BLL.ProductPrice();
            model.Id = this.Id;
            model.ProId = this.ProId;
            model.Title = txtColor.Text.Trim();
            model.Price = decimal.Parse(txtPrice.Text.Trim());
            model.PriceTitle = dPriceTitle.SelectedValue.ToString();
            model.OriginalPriceTitle = dOriginalPriceTitle.SelectedValue.ToString();
后面还有 15 行代码,购买后查看完整代码

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

AI 解读 AI

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

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