Пример #1
0
    protected void btn_Sub_Click(object sender, EventArgs e)
    {
        DataEntityDataContext context = new DataEntityDataContext();
        FenceXX Model = new FenceXX();

        Model.MC        = this.txt_MC.Text;
        Model.WHRID     = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        Model.Coords    = this.txt_Coords.Text;
        Model.FenceUser = this.UserName_Input.Value;
        Model.BZ2       = this.txt_BZ2.Text;
        Model.LX        = this.ddl_LX.SelectedValue;
        Model.DZ        = this.txt_DZ.Text;
        Model.BZ1       = this.ZT.SelectedValue;
        Model.WHSJ      = DateTime.Now;
        Model.WHR       = ZWL.Common.PublicMethod.GetSessionValue("TrueName");
        context.FenceXX.InsertOnSubmit(Model);
        context.SubmitChanges();

        //写系统日志
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "用户添加电子围栏(" + this.txt_MC.Text + ")";
        MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();
        Response.Write("<script>alert('电子围栏添加成功!');window.location.href='Fence.aspx'</script>");
        //ZWL.Common.MessageBox.ShowAndRedirect(this, "电子围栏添加成功!", "Fence.aspx");
    }
Пример #2
0
    protected void btn_Sub_Click(object sender, EventArgs e)
    {
        DataEntityDataContext context = new DataEntityDataContext();
        FenceXX Model = context.FenceXX.SingleOrDefault(f => f.ID == int.Parse(Request.QueryString["ID"].ToString()));
        Model.MC = this.txt_MC.Text;
        Model.WHRID = ZWL.Common.PublicMethod.GetSessionValue("UserName");

        string Coords = this.txt_Coords.Text.Replace("\r", "").Replace("\n", "");
        Model.Coords = Coords.Remove(Coords.Length - 1);

        Model.FenceUser = this.UserName_Input.Value;
        Model.BZ2 = this.txt_BZ2.Text;
        Model.LX = this.ddl_LX.SelectedValue;
        Model.DZ = this.txt_DZ.Text;
        Model.BZ1 = this.ZT.SelectedValue;
        Model.WHSJ = DateTime.Now;
        Model.WHR = ZWL.Common.PublicMethod.GetSessionValue("TrueName");
        context.SubmitChanges();

        //写系统日志
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "用户修改电子围栏信息(" + this.txt_MC.Text + ")";
        MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();
        Response.Write("<script>alert('电子围栏信息修改成功!');window.location.href='Fence.aspx'</script>");
        //ZWL.Common.MessageBox.ShowAndRedirect(this, "电子围栏信息修改成功!", "Fence.aspx");
    }
Пример #3
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        DataEntityDataContext context = new DataEntityDataContext();
        ERPYS Model = new ERPYS();

        Model.HeTongName  = this.txtHeTongName.Text.ToString();
        Model.QianYueKeHu = this.txtQianYueKeHu.Text.ToString();
        Model.HTJE        = this.txtHeTongMiaoShu.Text.ToString();
        Model.TiXingDate  = DateTime.Parse(this.txtShengXiaoDate.Text);
        Model.DaoKuanDate = DateTime.Parse(this.txtTiXingDate.Text);
        Model.CreateTime  = DateTime.Now;
        Model.CreateUser  = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        Model.BackInfo    = this.txtBackInfo.Text.ToString();
        Model.SFDK        = this.DZ.Value;
        Model.NowState    = "F";
        context.ERPYS.InsertOnSubmit(Model);
        context.SubmitChanges();

        //写系统日志
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "用户添加应付计划信息(" + this.txtHeTongName.Text + ")";
        MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();

        ZWL.Common.MessageBox.ShowAndRedirect(this, "应付信息添加成功!", "YF.aspx");
    }
Пример #4
0
    protected void btn_Sub_Click(object sender, EventArgs e)
    {
        DataEntityDataContext context = new DataEntityDataContext();
        var T = context.system_info.Where(p => p.LX == this.LX.SelectedValue);

        if (T.Count() > 0)
        {
            Response.Write("<script>alert('不能重复添加定位参!');</script>");
            //ZWL.Common.MessageBox.Show(this, "不能重复添加定位参数!");
        }
        else
        {
            system_info model = new system_info();
            model.LX     = this.LX.SelectedValue;
            model.CJJGSJ = int.Parse(this.TextBoxname.Text);
            model.WHSJ   = DateTime.Now;
            model.WHRID  = ZWL.Common.PublicMethod.GetSessionValue("UserName");
            model.WHR    = ZWL.Common.PublicMethod.GetSessionValue("TrueName");
            context.system_info.InsertOnSubmit(model);
            context.SubmitChanges();

            ////写系统日志
            //ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
            //MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
            //MyRiZhi.DoSomething = "用户添加公共信息(" + this.TextBoxname.Text + ")";
            //MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
            //MyRiZhi.Add();

            Response.Write("<script>alert('定位参数添加成功!');window.location.href='ZXWZ.aspx';</script>");
            //ZWL.Common.MessageBox.ShowAndRedirect(this, " 定位参数添加成功  !", "ZXWZ.aspx");
        }
    }
Пример #5
0
    protected void btn_Sub_Click(object sender, EventArgs e)
    {
        DataEntityDataContext context = new DataEntityDataContext();
        FenceXX Model = new FenceXX();
        Model.MC = this.txt_MC.Text;
        Model.WHRID = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        Model.Coords = this.txt_Coords.Text;
        Model.FenceUser = this.UserName_Input.Value;
        Model.BZ2 = this.txt_BZ2.Text;
        Model.LX = this.ddl_LX.SelectedValue;
        Model.DZ = this.txt_DZ.Text;
        Model.BZ1 = this.ZT.SelectedValue;
        Model.WHSJ = DateTime.Now;
        Model.WHR = ZWL.Common.PublicMethod.GetSessionValue("TrueName");
        context.FenceXX.InsertOnSubmit(Model);
        context.SubmitChanges();

        //写系统日志
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "用户添加电子围栏(" + this.txt_MC.Text + ")";
        MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();
        Response.Write("<script>alert('电子围栏添加成功!');window.location.href='Fence.aspx'</script>");
        //ZWL.Common.MessageBox.ShowAndRedirect(this, "电子围栏添加成功!", "Fence.aspx");
    }
Пример #6
0
    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>");
    }
Пример #7
0
    protected void btn_Sub_Click(object sender, EventArgs e)
    {
        DataEntityDataContext context = new DataEntityDataContext();
        var T = context.system_info.Where(p => p.LX == this.LX.SelectedValue);
        if(T.Count() > 0) {
            Response.Write("<script>alert('不能重复添加定位参!');</script>");
            //ZWL.Common.MessageBox.Show(this, "不能重复添加定位参数!");
        }
        else {
            system_info model = new system_info();
            model.LX = this.LX.SelectedValue;
            model.CJJGSJ = int.Parse(this.TextBoxname.Text);
            model.WHSJ = DateTime.Now;
            model.WHRID = ZWL.Common.PublicMethod.GetSessionValue("UserName");
            model.WHR = ZWL.Common.PublicMethod.GetSessionValue("TrueName");
            context.system_info.InsertOnSubmit(model);
            context.SubmitChanges();

            ////写系统日志
            //ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
            //MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
            //MyRiZhi.DoSomething = "用户添加公共信息(" + this.TextBoxname.Text + ")";
            //MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
            //MyRiZhi.Add();

            Response.Write("<script>alert('定位参数添加成功!');window.location.href='ZXWZ.aspx';</script>");
            //ZWL.Common.MessageBox.ShowAndRedirect(this, " 定位参数添加成功  !", "ZXWZ.aspx");
        }
    }
Пример #8
0
    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>");
    }
Пример #9
0
    protected void btn_Sub_Click(object sender, EventArgs e)
    {
        DataEntityDataContext context = new DataEntityDataContext();
        FenceXX Model = context.FenceXX.SingleOrDefault(f => f.ID == int.Parse(Request.QueryString["ID"].ToString()));

        Model.MC    = this.txt_MC.Text;
        Model.WHRID = ZWL.Common.PublicMethod.GetSessionValue("UserName");

        string Coords = this.txt_Coords.Text.Replace("\r", "").Replace("\n", "");

        Model.Coords = Coords.Remove(Coords.Length - 1);

        Model.FenceUser = this.UserName_Input.Value;
        Model.BZ2       = this.txt_BZ2.Text;
        Model.LX        = this.ddl_LX.SelectedValue;
        Model.DZ        = this.txt_DZ.Text;
        Model.BZ1       = this.ZT.SelectedValue;
        Model.WHSJ      = DateTime.Now;
        Model.WHR       = ZWL.Common.PublicMethod.GetSessionValue("TrueName");
        context.SubmitChanges();


        //写系统日志
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "用户修改电子围栏信息(" + this.txt_MC.Text + ")";
        MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();
        Response.Write("<script>alert('电子围栏信息修改成功!');window.location.href='Fence.aspx'</script>");
        //ZWL.Common.MessageBox.ShowAndRedirect(this, "电子围栏信息修改成功!", "Fence.aspx");
    }
Пример #10
0
 protected void QD_Click(object sender, EventArgs e)
 {
     DataEntityDataContext context = new DataEntityDataContext();
     var T = context.ERPHuiBao.SingleOrDefault(p => p.ID == int.Parse(Request.QueryString["ID"].ToString()));
     //T.CanLookUser = this.TextBox2.Text;
     T.CanLookUser = this.UserName_Input.Value;
     context.SubmitChanges();
     Response.Write("<script>alert('工作报告转发成功!');window.location.href='" + ReturnInput.Value + "'</script>");
     //ZWL.Common.MessageBox.ShowAndRedirect(this, "工作报告转发成功!", "HuiBao.aspx");
 }
Пример #11
0
    protected void QD_Click(object sender, EventArgs e)
    {
        DataEntityDataContext context = new DataEntityDataContext();
        var T = context.ERPHuiBao.SingleOrDefault(p => p.ID == int.Parse(Request.QueryString["ID"].ToString()));

        //T.CanLookUser = this.TextBox2.Text;
        T.CanLookUser = this.UserName_Input.Value;
        context.SubmitChanges();
        Response.Write("<script>alert('工作报告转发成功!');window.location.href='" + ReturnInput.Value + "'</script>");
        //ZWL.Common.MessageBox.ShowAndRedirect(this, "工作报告转发成功!", "HuiBao.aspx");
    }
Пример #12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();

            ZWL.BLL.ERPGongGao MyModel = new ZWL.BLL.ERPGongGao();
            MyModel.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
            this.Label1.Text = MyModel.TitleStr;
            this.Label2.Text = ZWL.Common.PublicMethod.GetWenJian(MyModel.FuJian, "../UploadFile/");
            this.Label4.Text = MyModel.ContentStr;
            this.Label5.Text = MyModel.TimeStr;
            this.Label3.Text = ZWL.DBUtility.DbHelperSQL.GetSHSL("select TrueName from ERPUser where UserName ='******'");
            string UserNames = "'" + MyModel.UserBuMen.Replace(",", "','") + "'";

            DataTable dt       = ZWL.DBUtility.DbHelperSQL.GetDataTable("select TrueName from ERPUser where UserName in (" + UserNames + ")");
            string    TrueName = "";
            foreach (DataRow R in dt.Rows)
            {
                TrueName += TrueName == "" ?  R["TrueName"].ToString() : "," + R["TrueName"].ToString();
            }
            this.Label6.Text = TrueName;

            this.Label7.Text = MyModel.Num.ToString();
            this.Label8.Text = MyModel.NoticeType.ToString();
            this.Label9.Text = MyModel.TypeStr.ToString();
            ZWL.DBUtility.DbHelperSQL.ExecuteSQL("update ERPGongGao set num= num+1 where ID=" + Request.QueryString["ID"].ToString());
            DataEntityDataContext context = new DataEntityDataContext();
            ERPGongGaoYD          model   = context.ERPGongGaoYD.SingleOrDefault(p => p.FID == int.Parse(Request.QueryString["ID"].ToString()) && p.XM == ZWL.Common.PublicMethod.GetSessionValue("UserName"));
            if (model != null)
            {
                model.SFYY = "是";
                model.YDSJ = DateTime.Now;
                context.SubmitChanges();
            }


            //var T = context.ERPGongGaoYD.Where(p => p.FID == int.Parse(Request.QueryString["ID"].ToString()));
            DataTable Gdt = ZWL.DBUtility.DbHelperSQL.GetDataTable("SELECT G.[ID],G.[FID],G.[SSBM] ,G.[XM] ,G.[SFYY] ,G.[YDSJ],G.[BZ1],G.[BZ2],U.[TrueName] " +
                                                                   "FROM [ERPGongGaoYD] as G left join [ERPUser] as U on G.XM=U.UserName " +
                                                                   "where G.[FID]='" + Request.QueryString["ID"].ToString() + "'");
            foreach (DataRow R in Gdt.Rows)
            {
                if (string.IsNullOrEmpty(R["TrueName"].ToString()))
                {
                    R["TrueName"] = R["XM"];
                }
            }
            this.GVData.DataSource = Gdt;
            GVData.DataBind();
            ReturnInput.Value = Request.UrlReferrer.ToString() == null ? "../GongGao/GongGao.aspx" : Request.UrlReferrer.ToString();
        }
    }
Пример #13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();

            ZWL.BLL.ERPGongGao MyModel = new ZWL.BLL.ERPGongGao();
            MyModel.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
            this.Label1.Text = MyModel.TitleStr;
            this.Label2.Text = ZWL.Common.PublicMethod.GetWenJian(MyModel.FuJian, "../UploadFile/");
            this.Label4.Text = MyModel.ContentStr;
            this.Label5.Text = MyModel.TimeStr;
            this.Label3.Text = ZWL.DBUtility.DbHelperSQL.GetSHSL("select TrueName from ERPUser where UserName ='******'");
            string UserNames = "'"+MyModel.UserBuMen.Replace(",","','")+"'";

            DataTable dt = ZWL.DBUtility.DbHelperSQL.GetDataTable("select TrueName from ERPUser where UserName in (" + UserNames + ")");
            string TrueName = "";
            foreach(DataRow R in dt.Rows)
            {
                TrueName += TrueName == "" ?  R["TrueName"].ToString() : "," + R["TrueName"].ToString();
            }
            this.Label6.Text = TrueName;

            this.Label7.Text = MyModel.Num.ToString();
            this.Label8.Text = MyModel.NoticeType.ToString();
            this.Label9.Text = MyModel.TypeStr.ToString();
            ZWL.DBUtility.DbHelperSQL.ExecuteSQL("update ERPGongGao set num= num+1 where ID=" + Request.QueryString["ID"].ToString());
            DataEntityDataContext context = new DataEntityDataContext();
            ERPGongGaoYD model = context.ERPGongGaoYD.SingleOrDefault(p => p.FID == int.Parse(Request.QueryString["ID"].ToString()) && p.XM == ZWL.Common.PublicMethod.GetSessionValue("UserName"));
            if(model!=null)
            {
                model.SFYY = "是";
                model.YDSJ = DateTime.Now;
                context.SubmitChanges();
            }

            //var T = context.ERPGongGaoYD.Where(p => p.FID == int.Parse(Request.QueryString["ID"].ToString()));
            DataTable Gdt = ZWL.DBUtility.DbHelperSQL.GetDataTable("SELECT G.[ID],G.[FID],G.[SSBM] ,G.[XM] ,G.[SFYY] ,G.[YDSJ],G.[BZ1],G.[BZ2],U.[TrueName] "+
                                                                   "FROM [ERPGongGaoYD] as G left join [ERPUser] as U on G.XM=U.UserName "+
                                                                   "where G.[FID]='"+Request.QueryString["ID"].ToString()+"'");
            foreach(DataRow R in Gdt.Rows){
                if(string.IsNullOrEmpty(R["TrueName"].ToString())) {
                    R["TrueName"] = R["XM"];
                }
            }
            this.GVData.DataSource = Gdt;
            GVData.DataBind();
            ReturnInput.Value = Request.UrlReferrer.ToString() == null ? "../GongGao/GongGao.aspx" : Request.UrlReferrer.ToString();
        }
    }
Пример #14
0
    //protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
    //{
    //    string FileNameStr = ZWL.Common.PublicMethod.UploadFileIntoDir(this.FileUpload1, DateTime.Now.Ticks.ToString() + System.IO.Path.GetExtension(FileUpload1.PostedFile.FileName));
    //    if (ZWL.Common.PublicMethod.GetSessionValue("WenJianList").Trim() == "")
    //    {
    //        ZWL.Common.PublicMethod.SetSessionValue("WenJianList", FileNameStr);
    //    }
    //    else
    //    {
    //        ZWL.Common.PublicMethod.SetSessionValue("WenJianList", ZWL.Common.PublicMethod.GetSessionValue("WenJianList") + "|" + FileNameStr);
    //    }
    //    ZWL.Common.PublicMethod.BindDDL(this.CheckBoxList1, ZWL.Common.PublicMethod.GetSessionValue("WenJianList"));
    //}
    //protected void ImageButton3_Click(object sender, ImageClickEventArgs e)
    //{
    //    try
    //    {
    //        for (int i = 0; i < this.CheckBoxList1.Items.Count; i++)
    //        {
    //            if (this.CheckBoxList1.Items[i].Selected == true)
    //            {
    //                ZWL.Common.PublicMethod.SetSessionValue("WenJianList", ZWL.Common.PublicMethod.GetSessionValue("WenJianList").Replace(this.CheckBoxList1.Items[i].Text, "").Replace("||", "|"));
    //            }
    //        }
    //        ZWL.Common.PublicMethod.BindDDL(this.CheckBoxList1, ZWL.Common.PublicMethod.GetSessionValue("WenJianList"));
    //    }
    //    catch
    //    { }
    //}
    //protected void ImageButton5_Click(object sender, ImageClickEventArgs e)
    //{
    //    try
    //    {
    //        if (this.CheckBoxList1.SelectedItem.Text.Trim().Length > 0)
    //        {
    //            Response.Write("<script>window.open('../DsoFramer/ReadFile.aspx?FilePath=" + this.CheckBoxList1.SelectedItem.Text + "');</script>");
    //        }
    //    }
    //    catch
    //    { }
    //}
    //protected void ImageButton6_Click(object sender, ImageClickEventArgs e)
    //{
    //    try
    //    {
    //        if (this.CheckBoxList1.SelectedItem.Text.Trim().Length > 0)
    //        {
    //            Response.Write("<script>window.open('../DsoFramer/EditFile.aspx?FilePath=" + this.CheckBoxList1.SelectedItem.Text + "');</script>");
    //        }
    //    }
    //    catch
    //    { }
    //}
    protected void btn_Sub_Click(object sender, EventArgs e)
    {
        DataEntityDataContext context = new DataEntityDataContext();
        system_info model = context.system_info.SingleOrDefault(p => p.ID == int.Parse(Request.QueryString["ID"].ToString()));
        model.LX = this.LX.SelectedValue;
        model.CJJGSJ = int.Parse(this.TextBoxname.Text);
        context.SubmitChanges();

        ////写系统日志
        //ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        //MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        //MyRiZhi.DoSomething = "用户修改工作计划信息(" + this.TextBox1.Text + ")";
        //MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        //MyRiZhi.Add();
        Response.Write("<script>alert('定位参数修改成功!');window.location.href='ZXWZ.aspx';</script>");
        //ZWL.Common.MessageBox.ShowAndRedirect(this, "定位参数修改成功!", "ZXWZ.aspx");
    }
Пример #15
0
    //protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
    //{
    //    string FileNameStr = ZWL.Common.PublicMethod.UploadFileIntoDir(this.FileUpload1, DateTime.Now.Ticks.ToString() + System.IO.Path.GetExtension(FileUpload1.PostedFile.FileName));
    //    if (ZWL.Common.PublicMethod.GetSessionValue("WenJianList").Trim() == "")
    //    {
    //        ZWL.Common.PublicMethod.SetSessionValue("WenJianList", FileNameStr);
    //    }
    //    else
    //    {
    //        ZWL.Common.PublicMethod.SetSessionValue("WenJianList", ZWL.Common.PublicMethod.GetSessionValue("WenJianList") + "|" + FileNameStr);
    //    }
    //    ZWL.Common.PublicMethod.BindDDL(this.CheckBoxList1, ZWL.Common.PublicMethod.GetSessionValue("WenJianList"));
    //}
    //protected void ImageButton3_Click(object sender, ImageClickEventArgs e)
    //{
    //    try
    //    {
    //        for (int i = 0; i < this.CheckBoxList1.Items.Count; i++)
    //        {
    //            if (this.CheckBoxList1.Items[i].Selected == true)
    //            {
    //                ZWL.Common.PublicMethod.SetSessionValue("WenJianList", ZWL.Common.PublicMethod.GetSessionValue("WenJianList").Replace(this.CheckBoxList1.Items[i].Text, "").Replace("||", "|"));
    //            }
    //        }
    //        ZWL.Common.PublicMethod.BindDDL(this.CheckBoxList1, ZWL.Common.PublicMethod.GetSessionValue("WenJianList"));
    //    }
    //    catch
    //    { }
    //}

    //protected void ImageButton5_Click(object sender, ImageClickEventArgs e)
    //{
    //    try
    //    {
    //        if (this.CheckBoxList1.SelectedItem.Text.Trim().Length > 0)
    //        {
    //            Response.Write("<script>window.open('../DsoFramer/ReadFile.aspx?FilePath=" + this.CheckBoxList1.SelectedItem.Text + "');</script>");
    //        }
    //    }
    //    catch
    //    { }
    //}
    //protected void ImageButton6_Click(object sender, ImageClickEventArgs e)
    //{
    //    try
    //    {
    //        if (this.CheckBoxList1.SelectedItem.Text.Trim().Length > 0)
    //        {
    //            Response.Write("<script>window.open('../DsoFramer/EditFile.aspx?FilePath=" + this.CheckBoxList1.SelectedItem.Text + "');</script>");
    //        }
    //    }
    //    catch
    //    { }
    //}
    protected void btn_Sub_Click(object sender, EventArgs e)
    {
        DataEntityDataContext context = new DataEntityDataContext();
        system_info           model   = context.system_info.SingleOrDefault(p => p.ID == int.Parse(Request.QueryString["ID"].ToString()));

        model.LX     = this.LX.SelectedValue;
        model.CJJGSJ = int.Parse(this.TextBoxname.Text);
        context.SubmitChanges();

        ////写系统日志
        //ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        //MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        //MyRiZhi.DoSomething = "用户修改工作计划信息(" + this.TextBox1.Text + ")";
        //MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        //MyRiZhi.Add();
        Response.Write("<script>alert('定位参数修改成功!');window.location.href='ZXWZ.aspx';</script>");
        //ZWL.Common.MessageBox.ShowAndRedirect(this, "定位参数修改成功!", "ZXWZ.aspx");
    }
Пример #16
0
    protected void btn_Sub_Click(object sender, EventArgs e)
    {
        ZWL.BLL.ERPGongGao Model = new ZWL.BLL.ERPGongGao();
        Model.TitleStr   = this.TextBox1.Text;
        Model.UserName   = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        Model.UserBuMen  = this.Send_Person.Value;
        Model.NoticeType = this.DropDownList1.SelectedValue;
        Model.ZT         = this.ZT.SelectedValue;
        Model.FuJian     = ZWL.Common.PublicMethod.GetSessionValue("WenJianList");
        Model.TypeStr    = this.TextBox3.Text;
        Model.ContentStr = this.TxtContent.Text;
        Model.Num        = 0;
        int id = Model.Add();

        DataEntityDataContext context = new DataEntityDataContext();

        if (!string.IsNullOrEmpty(this.Send_Person.Value))
        {
            string[] ss = this.Send_Person.Value.Split(',');
            for (int i = 0; i < ss.Length; i++)
            {
                ERPGongGaoYD model = new ERPGongGaoYD();
                model.FID  = id;
                model.SSBM = context.ERPUser.SingleOrDefault(p => p.UserName == ZWL.Common.PublicMethod.GetSessionValue("UserName")).Department;
                model.XM   = ss[i];
                model.SFYY = "否";
                model.BZ1  = "";
                model.BZ2  = "";
                context.ERPGongGaoYD.InsertOnSubmit(model);
                context.SubmitChanges();
            }
        }


        //写系统日志
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "用户添加通知公告信息(" + this.TextBox1.Text + ")";
        MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();
        Response.Write("<script>alert('通知公告信息添加成功!');window.location.href='GongGao.aspx'</script>");
    }
Пример #17
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        DataEntityDataContext context = new DataEntityDataContext();
        ERPYS Model = new ERPYS();

        Model      = context.ERPYS.SingleOrDefault(p => p.ID == int.Parse(Request.QueryString["ID"].ToString()));
        Model.SFDK = this.DZ.Value;
        ERPRecive model2 = context.ERPRecive.SingleOrDefault(p => p.ID == Model.FKID);

        model2.SFDK = this.DZ.Value;
        context.SubmitChanges();

        //写系统日志
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "用户修改应付信息(" + this.txtHeTongName.Text + ")";
        MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();

        ZWL.Common.MessageBox.ShowAndRedirect(this, "应付信息修改成功!", "YF.aspx");
    }
Пример #18
0
    string UserName = ""; //用户名

    #endregion Fields

    #region Methods

    protected void btn_Sub_Click(object sender, EventArgs e)
    {
        ZWL.BLL.ERPGongGao Model = new ZWL.BLL.ERPGongGao();
        Model.TitleStr = this.TextBox1.Text;
        Model.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        Model.UserBuMen = this.Send_Person.Value;
        Model.NoticeType = this.DropDownList1.SelectedValue;
        Model.ZT = this.ZT.SelectedValue;
        Model.FuJian = ZWL.Common.PublicMethod.GetSessionValue("WenJianList");
        Model.TypeStr = this.TextBox3.Text;
        Model.ContentStr = this.TxtContent.Text;
        Model.Num = 0;
        int id = Model.Add();

        DataEntityDataContext context = new DataEntityDataContext();
        if(!string.IsNullOrEmpty(this.Send_Person.Value)) {
            string[] ss =this.Send_Person.Value.Split(',');
            for(int i = 0; i < ss.Length; i++) {
                ERPGongGaoYD model = new ERPGongGaoYD();
                model.FID = id;
                model.SSBM = context.ERPUser.SingleOrDefault(p => p.UserName == ZWL.Common.PublicMethod.GetSessionValue("UserName")).Department;
                model.XM = ss[i];
                model.SFYY = "否";
                model.BZ1 = "";
                model.BZ2 = "";
                context.ERPGongGaoYD.InsertOnSubmit(model);
                context.SubmitChanges();
            }
        }

        //写系统日志
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "用户添加通知公告信息(" + this.TextBox1.Text + ")";
        MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();
        Response.Write("<script>alert('通知公告信息添加成功!');window.location.href='GongGao.aspx'</script>");
    }
Пример #19
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        DataEntityDataContext context = new DataEntityDataContext();
        ERPRecive             Model   = new ERPRecive();

        Model             = context.ERPRecive.SingleOrDefault(p => p.ID == int.Parse(Request.QueryString["ID"].ToString()));
        Model.ID          = int.Parse(Request.QueryString["ID"].ToString());
        Model.HeTongName  = this.txtHeTongName.Text.ToString();
        Model.QianYueKeHu = this.txtQianYueKeHu.Text.ToString();
        Model.HTJE        = this.txtHeTongMiaoShu.Text.ToString();
        Model.TiXingDate  = DateTime.Parse(this.txtShengXiaoDate.Text);
        Model.DaoKuanDate = DateTime.Parse(this.txtTiXingDate.Text);
        Model.SFDK        = this.DZ.Value;
        Model.BackInfo    = this.txtBackInfo.Text.ToString();
        ERPYS ys = new ERPYS();

        ys             = context.ERPYS.SingleOrDefault(p => p.FKID == Model.ID);
        ys.HeTongName  = this.txtHeTongName.Text.ToString();
        ys.QianYueKeHu = this.txtQianYueKeHu.Text.ToString();
        ys.HTJE        = this.txtHeTongMiaoShu.Text.ToString();
        ys.TiXingDate  = DateTime.Parse(this.txtShengXiaoDate.Text);
        ys.DaoKuanDate = DateTime.Parse(this.txtTiXingDate.Text);
        ys.BackInfo    = this.txtBackInfo.Text.ToString();
        ys.SFDK        = this.DZ.Value;
        ys.NowState    = "F";
        context.SubmitChanges();

        //写系统日志
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "用户修改付款计划信息(" + this.txtHeTongName.Text + ")";
        MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();

        ZWL.Common.MessageBox.ShowAndRedirect(this, "付款计划信息修改成功!", "FK.aspx");
    }