tycrm/HTDD/HeTong/MyHeTongMx_add.aspx.cs

(开头部分) 2KB

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

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

using System.Collections;


namespace tycrm.HTDD.HeTong
{
    public partial class MyHeTongMx_add : 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 KhId,Zhuti from qp_crm_HeTong where id='" + Request.QueryString["id"] + "'";
                SqlDataReader NewReader = List.GetList(SQL_GetList);
                if (NewReader.Read())
                {
                    HtDdName.Text = NewReader["Zhuti"].ToString();
                }
                NewReader.Close();
            }
        }


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

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

        protected void Button1_Click(object sender, EventArgs e)
        {
            //string SQL_GetList = "select id from qp_crm_DingDanMx  where HtDd='" + Request.QueryString["id"] + "' and CpId='" + CpId.Text + "'";
            //SqlDataReader NewReader = List.GetList(SQL_GetList);
            //if (NewReader.Read())
            //{
            //    this.Response.Write("<script language=javascript>alert('该合同/订单下已存在此产品,不能重复!');</script>");
            //    return;
            //}
            //NewReader.Close();

            string sql_insert = "insert into qp_crm_DingDanMx (Username,Realname,NowTimes,HtDd,CpId,ShijianJh,ShijianSj,Danjia,Shuliang,Zhekou,Zongjia,Chuku,Beizhu,JfJL) values ('" + Session["Username"] + "','" + Session["Realname"] + "','" + System.DateTime.Now.ToShortDateString() + "','" + Request.QueryString["id"] + "','" + List.GetFormatStr(CpId.Text) + "','" + List.GetFormatStr(ShijianJh.Text) + "','','" + List.GetFormatStr(Danjia.Text) + "','" + List.GetFormatStr(Shuliang.Text) + "','" + List.GetFormatStr(Zhekou.Text) + "','" + List.GetFormatStr(Zongjia.Text) + "','1','" + List.GetFormatStr(Beizhu.Text) + "','" + JfJL.SelectedValue + "')";
后面还有 7 行代码,解锁后查看完整代码

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

AI 解读

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

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