示例#1
0
文件: POIAdd.aspx.cs 项目: cnbin/HLB
    protected void btn_Sub_Click(object sender, EventArgs e)
    {
        DataEntityDataContext context = new DataEntityDataContext();
        POIXX Model = new POIXX();

        Model.MC    = this.TextBox1.Text;
        Model.WHRID = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        Model.X     = this.TextBox3.Text;
        Model.Y     = this.TextBox4.Text;
        Model.BZ2   = this.TextBox5.Text;
        Model.LX    = this.DropDownList1.SelectedValue;
        Model.DZ    = this.TxtContent.Text;
        Model.BZ1   = this.ZT.SelectedValue;
        Model.WHSJ  = DateTime.Now;
        Model.WHR   = ZWL.Common.PublicMethod.GetSessionValue("TrueName");
        context.POIXX.InsertOnSubmit(Model);
        context.SubmitChanges();

        //写系统日志
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "用户添加POI信息(" + this.TextBox1.Text + ")";
        MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();
        Response.Write("<script>alert('POI信息添加成功!');window.location.href='POI.aspx'</script>");
    }
示例#2
0
文件: POIAdd.aspx.cs 项目: cnbin/HLB
    protected void btn_Sub_Click(object sender, EventArgs e)
    {
        DataEntityDataContext context = new DataEntityDataContext();
        POIXX Model = new POIXX();
        Model.MC = this.TextBox1.Text;
        Model.WHRID = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        Model.X = this.TextBox3.Text;
        Model.Y = this.TextBox4.Text;
        Model.BZ2 = this.TextBox5.Text;
        Model.LX = this.DropDownList1.SelectedValue;
        Model.DZ = this.TxtContent.Text;
        Model.BZ1 = this.ZT.SelectedValue;
        Model.WHSJ = DateTime.Now;
        Model.WHR = ZWL.Common.PublicMethod.GetSessionValue("TrueName");
        context.POIXX.InsertOnSubmit(Model);
        context.SubmitChanges();

        //写系统日志
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "用户添加POI信息(" + this.TextBox1.Text + ")";
        MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();
        Response.Write("<script>alert('POI信息添加成功!');window.location.href='POI.aspx'</script>");
    }
示例#3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();

            DataEntityDataContext context = new DataEntityDataContext();
            POIXX Model = context.POIXX.SingleOrDefault(p => p.ID == int.Parse(Request.QueryString["ID"].ToString()));
            var   T     = context.ERPCommon.Where(p => p.Code == "QDDLX").OrderBy(p => p.CSort);

            foreach (var item in T)
            {
                this.DropDownList1.Items.Add(new ListItem(item.CName, item.CName));
            }
            this.TextBox1.Text = Model.MC;
            this.TextBox3.Text = Model.X;
            this.TextBox4.Text = Model.Y;
            this.TextBox5.Text = Model.BZ2;
            this.DropDownList1.SelectedValue = Model.LX;
            this.TxtContent.Text             = Model.DZ;
            this.ZT.SelectedValue            = Model.BZ1;
            ReturnInput.Value = Request.UrlReferrer.ToString() == null ? "../QDGL/POI.aspx" : Request.UrlReferrer.ToString();
        }
    }
示例#4
0
 partial void DeletePOIXX(POIXX instance);
示例#5
0
 partial void UpdatePOIXX(POIXX instance);
示例#6
0
 partial void InsertPOIXX(POIXX instance);