tycrm/KCGL/Pandian/PandianMx_update.aspx.cs

(完整代码) 2KB

using System;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Data.SqlClient;
using qpsmartweb.Public;

using System.Collections;

namespace tycrm.KCGL.Pandian
{
    public partial class PandianMx_update : System.Web.UI.Page
    {
        Db List = new Db();
        
        
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Session["username"] == null)
            {
                this.Response.Write("<script language=javascript>alert('登陆超时!');window.parent.location = '/main_d.aspx'</script>");
                return;
            }

            if (!Page.IsPostBack)
            {
                BindAttribute();

                string SQL_GetList = "select * from qp_crm_PandianMx  where id='" + List.GetFormatStr(Request.QueryString["id"]) + "'  ";
                SqlDataReader NewReader = List.GetList(SQL_GetList);
                if (NewReader.Read())
                {
                    CpId.Text = NewReader["CpId"].ToString();
                    CpName.Text = List.TypeCodecrm("Mingcheng", "qp_crm_ChangPin", NewReader["CpId"].ToString());
                    Chayi.Text = NewReader["Chayi"].ToString();
                    Beizhu.Text = NewReader["Beizhu"].ToString();
                }
                NewReader.Close();
            }
        }


        public void BindAttribute()
        {
            CpName.Attributes.Add("readonly", "readonly");

            Button1.Attributes["onclick"] = "javascript:return chknull();";
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            string Sql_update = "Update qp_crm_PandianMx  Set  CpId='" + List.GetFormatStr(CpId.Text) + "',Chayi='" + List.GetFormatStr(Chayi.Text) + "',Beizhu='" + List.GetFormatStr(Beizhu.Text) + "' where id='" + int.Parse(Request.QueryString["id"]) + "'";
            List.ExeSql(Sql_update);

            List.InsertLog("修改库存盘点明细[" + CpName.Text + "]", "库存盘点");
            this.Response.Write("<script language=javascript>alert('提交成功!');window.close()</script>");
        }
    }
}

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

AI 解读

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

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