tycrm/KHGZ/FeiYong/FeiYong_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.KHGZ.FeiYong
{
    public partial class FeiYong_add : System.Web.UI.Page
    {
        Db List = new Db();
        
        BindDrowDownList list = new BindDrowDownList();
        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)
            {
                BindDroList();
                BindAttribute();
                Shijian.Text = System.DateTime.Now.ToShortDateString();
            }
        }

        public void BindDroList()
        {
            string sql_down_Laiyuan = "select * from qp_crm_DataFile where type=16 and ifdel=0";
            list.Bind_DropDownList_kong(Leibie, sql_down_Laiyuan, "id", "Name");
        }

        public void BindAttribute()
        {
            Shijian.Attributes.Add("readonly", "readonly");
            KhName.Attributes.Add("readonly", "readonly");
            Button1.Attributes["onclick"] = "javascript:return chknull();";
            Button2.Attributes["onclick"] = "javascript:return showwait();";
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            string sql_insert = "insert into qp_crm_FeiYong  (KhId,Shijian,jine,Piaoshu,Leibie,Yongtu,Beizhu,Zhuangtai,Username,Realname,NowTimes) values ('" + List.GetFormatStr(KhId.Text) + "','" + List.GetFormatStr(Shijian.Text) + "','" + List.GetFormatStr(jine.Text) + "','" + List.GetFormatStr(Piaoshu.Text) + "','" + Leibie.SelectedValue + "','" + List.GetFormatStr(Yongtu.Text) + "','" + List.GetFormatStr(Beizhu.Text) + "','1','" + Session["Username"] + "','" + Session["Realname"] + "','" + System.DateTime.Now.ToShortDateString() + "')";
            List.ExeSql(sql_insert);

            List.InsertLog("新增销售费用[" + KhName.Text + "]", "销售费用");
            this.Response.Write("<script language=javascript>alert('提交成功!');window.location.href='FeiYong.aspx'</script>");
        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            Response.Redirect("FeiYong.aspx");
后面还有 3 行代码,解锁后查看完整代码

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

AI 解读

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

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