Example #1
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();

        }
    }
Example #2
0
 public void DataBindToGridview(string IDList)
 {
     DataEntityDataContext context = new DataEntityDataContext();
     ZWL.BLL.ERPTiKuKaoShi MyLanEmail = new ZWL.BLL.ERPTiKuKaoShi();
     var T = context.ERPTiKuKaoShi.Where(p => p.ID>0).OrderByDescending(p => p.ID);
     EmailList = T.ToList();
 }
Example #3
0
 public void DataBindToGridview()
 {
     DataEntityDataContext context = new DataEntityDataContext();
     ZWL.BLL.ERPNetEmail MyLanEmail = new ZWL.BLL.ERPNetEmail();
     var T = context.ERPNetEmail.Where(p => p.FromUser == ZWL.Common.PublicMethod.GetSessionValue("UserName") && p.EmailState == "草稿").OrderByDescending(p => p.ID);
     EmailList = T.ToList();
 }
Example #4
0
	public void DataBindToGridview(string IDList)
	{
        DataEntityDataContext context = new DataEntityDataContext();
        ZWL.BLL.ERPTiKuKaoShi MyLanEmail = new ZWL.BLL.ERPTiKuKaoShi();
        var T = context.ERPTiKuKaoShi.Where(p => p.ID>0).OrderByDescending(p => p.ID);
        EmailList = T.ToList();
	}
Example #5
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>");
    }
Example #6
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");
        }
    }
Example #7
0
 public void DataBindToGridview()
 {
     DataEntityDataContext context = new DataEntityDataContext();
     ZWL.BLL.ERPPeiXunRiJi MyLanEmail = new ZWL.BLL.ERPPeiXunRiJi();
     var T = context.ERPPeiXunRiJi.Where(p => p.ID > 0).OrderByDescending(p => p.ID);
     EmailList = T.ToList();
 }
Example #8
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");
    }
Example #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            string dirid = "0";
            dirid = ZWL.DBUtility.DbHelperSQL.GetSHSL("select top 1 DirID from ERPBuMen where ID='" + ZWL.Common.PublicMethod.GetSessionValue("DepartmentID") + "'");

            //BindTree(this.ListTreeView.Nodes, 0);
            ListTreeView.Attributes.Add("onclick ", "OnClientTreeNodeChecked(event) ");
            string uname = Request["username"];
            if ((Request["token"] ?? "") == "ajax" && !string.IsNullOrEmpty(uname))
            {
                DataEntityDataContext context = new DataEntityDataContext();
                var T = context.WZXX.Where(p => p.ID > 0 && p.XM==uname);
                T = T.OrderByDescending(p => p.RQ);
                string res = "";
                var item = T.First();
                string Serils = ZWL.DBUtility.DbHelperSQL.GetSHSL("select [Serils] from [ERPUser] where [UserName] ='" + item.XM + "'");
                string Fence= ZWL.DBUtility.DbHelperSQL.GetSHSL("select [MC] from [FenceXX] where [FenceUser] ='" + item.XM + "'");
                Serils = Serils == "" ? "无" : Serils;
                Fence = Fence == "" ? "无" : Fence;
                res = item.X + "," + item.Y + "," + item.XM + "," + item.POI + "," + Serils + "," + Fence;
                Response.Clear();
                Response.Write(res);
                Response.End();
            }

            SettingWorkTime.Visible = ZWL.Common.PublicMethod.StrIFIn("|001A|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            Notice.Visible = ZWL.Common.PublicMethod.StrIFIn("|004|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            AttendanceSel.Visible = ZWL.Common.PublicMethod.StrIFIn("|107|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            WarningSel.Visible = ZWL.Common.PublicMethod.StrIFIn("|109|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            BindTree(this.ListTreeView.Nodes, Convert.ToInt32(dirid));
        }
    }
Example #10
0
    public void DataBindToGridview()
    {
        DataEntityDataContext context = new DataEntityDataContext();

        foreach (var Fence in context.FenceXX.ToList())
        {
            string   Coords     = "";
            string[] CoordsList = Fence.Coords.Split(';');
            for (int i = 0; i < CoordsList.Length; i++)
            {
                if ((i + 1) % 3 == 0)  //换行
                {
                    Coords += CoordsList[i] + ";" + "<br />";
                }
                else
                {
                    Coords += CoordsList[i] + ";" + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
                }
            }
            Fence.Coords = Coords;
        }
        var T = context.FenceXX.Where(f => f.ID > 0);

        if (!string.IsNullOrEmpty(this.TextBox1.Text))
        {
            T = T.Where(f => f.MC.Contains(this.TextBox1.Text));
        }
        GVData.DataSource = T.ToList();

        GVData.DataBind();
        LabPageSum.Text     = Convert.ToString(GVData.PageCount);
        LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
        this.GoPage.Text    = LabCurrentPage.Text.ToString();
    }
Example #11
0
    public void DataBindToGridview()
    {
        DataEntityDataContext context = new DataEntityDataContext();
        foreach(var Fence in context.FenceXX.ToList()) {
            string Coords = "";
            string[] CoordsList = Fence.Coords.Split(';');
            for(int i = 0; i < CoordsList.Length; i++) {
                if((i + 1) % 3 == 0) { //换行
                    Coords += CoordsList[i] + ";" + "<br />";
                }
                else {
                    Coords += CoordsList[i] + ";" + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
                }
            }
            Fence.Coords = Coords;
        }
        var T = context.FenceXX.Where(f => f.ID > 0);
        if(!string.IsNullOrEmpty(this.TextBox1.Text)) {
            T = T.Where(f => f.MC.Contains(this.TextBox1.Text));
        }
        GVData.DataSource = T.ToList();

        GVData.DataBind();
        LabPageSum.Text = Convert.ToString(GVData.PageCount);
        LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
        this.GoPage.Text = LabCurrentPage.Text.ToString();
    }
Example #12
0
 public void DataBindToGridview()
 {
     DataEntityDataContext context = new DataEntityDataContext();
     ZWL.BLL.ERPMobile MyLanEmail = new ZWL.BLL.ERPMobile();
     var T = context.ERPMobile.Where(p => p.FaSongUser == ZWL.Common.PublicMethod.GetSessionValue("UserName")).OrderByDescending(p => p.ID);
     MobileList = T.ToList();
 }
Example #13
0
 public void DataBindToGridview()
 {
     DataEntityDataContext context = new DataEntityDataContext();
     ERPNWorkToDo MyLanEmail = new ERPNWorkToDo();
     var T = context.ERPNWorkToDo.Where(p => p.StateNow == "正在办理" && p.ShenPiUserList.Contains(ZWL.Common.PublicMethod.GetSessionValue("UserName"))).OrderByDescending(p => p.ID);
     EmailList = T.ToList();
 }
Example #14
0
    public void DataBindToGridview()
    {
        string XiaShuUser             = ZWL.DBUtility.DbHelperSQL.GetSHSLInt("select top 1 XiaShuUser from ERPUser where UserName='******'");
        DataEntityDataContext context = new DataEntityDataContext();
        ERPRecive             Model   = new ERPRecive();
        var T = context.ERPRecive.Where(p => p.ID > 0 && p.NowState == "S");

        if (!string.IsNullOrEmpty(this.TextBox1.Text))
        {
            T = T.Where(p => p.HeTongName.Contains(this.TextBox1.Text) || p.QianYueKeHu.Contains(this.TextBox1.Text) || p.SFDK.Contains(this.TextBox1.Text) || p.HTJE.Contains(this.TextBox1.Text));
        }
        if (!string.IsNullOrEmpty(this.TextBox3.Text))
        {
            T = T.Where(p => p.DaoKuanDate >= DateTime.Parse(this.TextBox3.Text) || p.TiXingDate >= DateTime.Parse(this.TextBox3.Text) || p.CreateTime >= DateTime.Parse(this.TextBox3.Text));
        }
        if (!string.IsNullOrEmpty(this.TextBox4.Text))
        {
            T = T.Where(p => p.DaoKuanDate >= DateTime.Parse(this.TextBox4.Text) || p.TiXingDate >= DateTime.Parse(this.TextBox4.Text) || p.CreateTime >= DateTime.Parse(this.TextBox4.Text));
        }
        GVData.DataSource = T;
        GVData.DataBind();
        LabPageSum.Text     = Convert.ToString(GVData.PageCount);
        LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
        this.GoPage.Text    = LabCurrentPage.Text.ToString();
    }
Example #15
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");
        }
    }
Example #16
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>");
    }
Example #17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();

            DataEntityDataContext context = new DataEntityDataContext();
            ERPRecive             Model   = new ERPRecive();
            Model = context.ERPRecive.SingleOrDefault(p => p.ID == int.Parse(Request.QueryString["ID"].ToString()));
            this.lblHeTongName.Text = Model.HeTongName.ToString();
            HeTongName = Model.HeTongName.ToString();

            this.lblQianYueKeHu.Text   = Model.QianYueKeHu.ToString();
            this.lblHeTongMiaoShu.Text = Model.HTJE.ToString();

            this.lblShengXiaoDate.Text = Model.TiXingDate.ToString().Replace(" 0:00:00", "");

            this.lblTiXingDate.Text = Model.DaoKuanDate.ToString().Replace(" 0:00:00", "");
            this.Label1.Text        = Model.SFDK;
            this.lblCreateTime.Text = Model.CreateTime.ToString();
            this.lblCreateUser.Text = Model.CreateUser.ToString();

            this.lblBackInfo.Text = Model.BackInfo.ToString();

            //写系统日志
            ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
            MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
            MyRiZhi.DoSomething = "用户查看收款计划信息(" + this.lblHeTongName.Text + ")";
            MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
            MyRiZhi.Add();
        }
    }
Example #18
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");
    }
Example #19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            string dirid = "0";
            dirid = ZWL.DBUtility.DbHelperSQL.GetSHSL("select top 1 DirID from ERPBuMen where ID='" + ZWL.Common.PublicMethod.GetSessionValue("DepartmentID") + "'");

            //BindTree(this.ListTreeView.Nodes, 0);
            ListTreeView.Attributes.Add("onclick ", "OnClientTreeNodeChecked(event) ");
            string uname = Request["username"];
            if ((Request["token"] ?? "") == "ajax" && !string.IsNullOrEmpty(uname))
            {
                DataEntityDataContext context = new DataEntityDataContext();
                var T = context.WZXX.Where(p => p.ID > 0 && p.XM == uname);
                T = T.OrderByDescending(p => p.RQ);
                string res    = "";
                var    item   = T.First();
                string Serils = ZWL.DBUtility.DbHelperSQL.GetSHSL("select [Serils] from [ERPUser] where [UserName] ='" + item.XM + "'");
                string Fence  = ZWL.DBUtility.DbHelperSQL.GetSHSL("select [MC] from [FenceXX] where [FenceUser] ='" + item.XM + "'");
                Serils = Serils == "" ? "无" : Serils;
                Fence  = Fence == "" ? "无" : Fence;
                res    = item.X + "," + item.Y + "," + item.XM + "," + item.POI + "," + Serils + "," + Fence;
                Response.Clear();
                Response.Write(res);
                Response.End();
            }

            SettingWorkTime.Visible = ZWL.Common.PublicMethod.StrIFIn("|001A|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            Notice.Visible          = ZWL.Common.PublicMethod.StrIFIn("|004|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            AttendanceSel.Visible   = ZWL.Common.PublicMethod.StrIFIn("|107|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            WarningSel.Visible      = ZWL.Common.PublicMethod.StrIFIn("|109|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            BindTree(this.ListTreeView.Nodes, Convert.ToInt32(dirid));
        }
    }
Example #20
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");
    }
Example #21
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");
    }
Example #22
0
 public void DataBindToGridview()
 {
     DataEntityDataContext context = new DataEntityDataContext();
     ZWL.BLL.ERPWorkPlan MyLanEmail = new ZWL.BLL.ERPWorkPlan();
     var T = context.ERPWorkPlan.Where(p => p.UserName == ZWL.Common.PublicMethod.GetSessionValue("UserName")).OrderByDescending(p => p.ID);
     EmailList = T.ToList();
 }
        protected override void Initialize(HttpControllerContext controllerContext)
        {
            base.Initialize(controllerContext);
            var Header = controllerContext.Request.Headers;

            if (Header.Contains("Authorization"))
            {
                var Token = Header.GetValues("Authorization").First();
                using (DataEntityDataContext DB = new DataEntityDataContext())
                {
                    var account = DB.Accounts.Where(u => u.AccessToken == Token).ToList();
                    if (account.Count > 0)
                    {
                        if (account.First().ExpireDate < DateTime.Now)
                        {
                            CreateResponseException(HttpStatusCode.Unauthorized, "Token is expire");
                        }
                        CurrentAccount = account.First();
                    }
                    else
                    {
                        CreateResponseException(HttpStatusCode.Unauthorized, "Token is invalid");
                    }
                }
            }
            else
            {
                CreateResponseException(HttpStatusCode.Unauthorized, "Access denied");
            }
        }
Example #24
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");
    }
Example #25
0
    public void DataBindToGridview()
    {
        DataEntityDataContext context    = new DataEntityDataContext();
        ERPNWorkToDo          MyLanEmail = new ERPNWorkToDo();
        var T = context.ERPNWorkToDo.Where(p => p.StateNow == "正在办理" && p.ShenPiUserList.Contains(ZWL.Common.PublicMethod.GetSessionValue("UserName"))).OrderByDescending(p => p.ID);

        EmailList = T.ToList();
    }
Example #26
0
    public void DataBindToGridview()
    {
        DataEntityDataContext context = new DataEntityDataContext();

        ZWL.BLL.ERPNetEmail MyLanEmail = new ZWL.BLL.ERPNetEmail();
        var T = context.ERPNetEmail.Where(p => p.ToUser == ZWL.Common.PublicMethod.GetSessionValue("UserName") && (p.EmailState == "未读" || p.EmailState == "已读")).OrderByDescending(p => p.ID);

        EmailList = T.ToList();
    }
Example #27
0
    public void DataBindToGridview(string IDList)
    {
        DataEntityDataContext context = new DataEntityDataContext();

        ZWL.BLL.ERPXueXiXinDe MyLanEmail = new ZWL.BLL.ERPXueXiXinDe();
        var T = context.ERPXueXiXinDe.Where(p => p.ID > 0 && p.UserName == ZWL.Common.PublicMethod.GetSessionValue("UserName")).OrderByDescending(p => p.ID);

        EmailList = T.ToList();
    }
Example #28
0
    public void DataBindToGridview()
    {
        DataEntityDataContext context = new DataEntityDataContext();

        ZWL.BLL.ERPMobile MyLanEmail = new ZWL.BLL.ERPMobile();
        var T = context.ERPMobile.Where(p => p.FaSongUser == ZWL.Common.PublicMethod.GetSessionValue("UserName")).OrderByDescending(p => p.ID);

        MobileList = T.ToList();
    }
Example #29
0
    public void DataBindToGridview()
    {
        DataEntityDataContext context = new DataEntityDataContext();

        ZWL.BLL.ERPPeiXun MyLanEmail = new ZWL.BLL.ERPPeiXun();
        var T = context.ERPPeiXun.Where(p => p.ID > 0).OrderByDescending(p => p.ID);

        EmailList = T.ToList();
    }
Example #30
0
    public void DataBindToGridview()
    {
        DataEntityDataContext context = new DataEntityDataContext();

        ZWL.BLL.ERPWorkPlan MyLanEmail = new ZWL.BLL.ERPWorkPlan();
        var T = context.ERPWorkPlan.Where(p => p.UserName == ZWL.Common.PublicMethod.GetSessionValue("UserName")).OrderByDescending(p => p.ID);

        EmailList = T.ToList();
    }
Example #31
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");
 }
Example #32
0
    public void DataBindToGridview()
    {
        DataEntityDataContext context = new DataEntityDataContext();
        var T = context.system_info.Where(p => p.ID > 0);

        GVData.DataSource = T.ToList();
        GVData.DataBind();
        LabPageSum.Text = Convert.ToString(GVData.PageCount);
        LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
        this.GoPage.Text = LabCurrentPage.Text.ToString();
    }
Example #33
0
    public void DataBindToGridview()
    {
        DataEntityDataContext context = new DataEntityDataContext();
        var T = context.system_info.Where(p => p.ID > 0);

        GVData.DataSource = T.ToList();
        GVData.DataBind();
        LabPageSum.Text     = Convert.ToString(GVData.PageCount);
        LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
        this.GoPage.Text    = LabCurrentPage.Text.ToString();
    }
Example #34
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");
    }
Example #35
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();
        }
    }
Example #36
0
 public void DataBindToGridview()
 {
     string XiaShuUser = ZWL.DBUtility.DbHelperSQL.GetSHSLInt("select top 1 XiaShuUser from ERPUser where UserName='******'");
     DataEntityDataContext context = new DataEntityDataContext();
     ZWL.BLL.ERPWorkRiZhi MyModel = new ZWL.BLL.ERPWorkRiZhi();
     var T = context.ERPWorkRiZhi.Where(p => p.ID > 0);
     if (XiaShuUser != "全部")
     {
         string[] res = XiaShuUser.Split(',');
         T = T.Where(p=>res.Contains(p.UserName)).OrderByDescending(p => p.ID);
     }
     EmailList = T.ToList();
 }
Example #37
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();
        }
    }
Example #38
0
 public void DataBindToGridview()
 {
     DataEntityDataContext context = new DataEntityDataContext();
     var T = context.POIXX.Where(p => p.ID > 0);
     if (!string.IsNullOrEmpty(this.TextBox1.Text))
     {
         T = T.Where(p => p.MC.Contains(this.TextBox1.Text));
     }
     GVData.DataSource = T.ToList();
     GVData.DataBind();
     LabPageSum.Text = Convert.ToString(GVData.PageCount);
     LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
     this.GoPage.Text = LabCurrentPage.Text.ToString();
 }
Example #39
0
    public void DataBindToGridview()
    {
        string XiaShuUser             = ZWL.DBUtility.DbHelperSQL.GetSHSLInt("select top 1 XiaShuUser from ERPUser where UserName='******'");
        DataEntityDataContext context = new DataEntityDataContext();

        ZWL.BLL.ERPWorkRiZhi MyModel = new ZWL.BLL.ERPWorkRiZhi();
        var T = context.ERPWorkRiZhi.Where(p => p.ID > 0);

        if (XiaShuUser != "全部")
        {
            string[] res = XiaShuUser.Split(',');
            T = T.Where(p => res.Contains(p.UserName)).OrderByDescending(p => p.ID);
        }
        EmailList = T.ToList();
    }
Example #40
0
 public void DataBindToGridview(string IDList)
 {
     DataEntityDataContext context = new DataEntityDataContext();
     ZWL.BLL.ERPTaskFP MyModel = new ZWL.BLL.ERPTaskFP();
     var T = context.ERPTaskFP.Where(p => p.ID > 0);
     if (IDList.Trim().Length > 0)
     {
         T = T.Where(p => p.ToUserList.Contains(',' + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ',') && IDList.Contains(p.ID.ToString())).OrderByDescending(p => p.ID);
     }
     else
     {
         T = T.Where(p => p.ToUserList.Contains(',' + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ',')).OrderByDescending(p => p.ID);
     }
     EmailList = T.ToList();
 }
Example #41
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ZWL.Common.PublicMethod.CheckSession();
         //绑定页面数据
         DataEntityDataContext context = new DataEntityDataContext();
         var T = context.system_info.SingleOrDefault(p => p.ID == int.Parse(Request.QueryString["ID"].ToString()));
         this.LX.SelectedValue = T.LX;
         this.TextBoxname.Text = T.CJJGSJ.ToString();
         ReturnInput.Value     = Request.UrlReferrer.ToString() == null ? "../QDGL/ZXWZ.aspx" : Request.UrlReferrer.ToString();
         //ZWL.Common.PublicMethod.SetSessionValue("WenJianList", MyModel.FuJianStr);
         //ZWL.Common.PublicMethod.BindDDL(this.CheckBoxList1, ZWL.Common.PublicMethod.GetSessionValue("WenJianList"));
     }
 }
Example #42
0
    public void DataBindToGridview()
    {
        DataEntityDataContext context = new DataEntityDataContext();
        var T = context.POIXX.Where(p => p.ID > 0);

        if (!string.IsNullOrEmpty(this.TextBox1.Text))
        {
            T = T.Where(p => p.MC.Contains(this.TextBox1.Text));
        }
        GVData.DataSource = T.ToList();
        GVData.DataBind();
        LabPageSum.Text     = Convert.ToString(GVData.PageCount);
        LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
        this.GoPage.Text    = LabCurrentPage.Text.ToString();
    }
Example #43
0
 public void DataBindToGridview()
 {
     DataEntityDataContext context = new DataEntityDataContext();
     ZWL.BLL.ERPGongGao MyLanEmail = new ZWL.BLL.ERPGongGao();
     type = Request.QueryString["Type"].ToString().Trim();
     if (Request.QueryString["Type"].ToString().Trim() == "单位")
     {
         var T = context.ERPGongGao.Where(p => p.TypeStr == "单位").OrderByDescending(p => p.ID);
         EmailList = T.ToList();
     }
     else
     {
         var T = context.ERPGongGao.Where(p => p.TypeStr == "单位").OrderByDescending(p => p.ID);
         EmailList = T.ToList();
     }
 }
Example #44
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();
            //设置上传的附件为空
            DataEntityDataContext context = new DataEntityDataContext();
            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));
            }
            ReturnInput.Value = Request.UrlReferrer.ToString() == null ? "../QDGL/POI.aspx" : Request.UrlReferrer.ToString();
        }
    }
Example #45
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();
            //设置上传的附件为空
            DataEntityDataContext context = new DataEntityDataContext();
            var T = context.ERPCommon.Where(p => p.Code == "QDDLX").OrderBy(p => p.CSort);

            foreach (var item in T)
            {
                this.ddl_LX.Items.Add(new ListItem(item.CName, item.CName));
            }
            ReturnInput.Value = Request.UrlReferrer.ToString() == null ? "../QDGL/Fence.aspx" : Request.UrlReferrer.ToString();
        }
    }
Example #46
0
    public void DataBindToGridview(string IDList)
    {
        DataEntityDataContext context = new DataEntityDataContext();

        ZWL.BLL.ERPTaskFP MyModel = new ZWL.BLL.ERPTaskFP();
        var T = context.ERPTaskFP.Where(p => p.ID > 0);

        if (IDList.Trim().Length > 0)
        {
            T = T.Where(p => p.ToUserList.Contains(',' + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ',') && IDList.Contains(p.ID.ToString())).OrderByDescending(p => p.ID);
        }
        else
        {
            T = T.Where(p => p.FromUser == ZWL.Common.PublicMethod.GetSessionValue("UserName")).OrderByDescending(p => p.ID);
        }
        EmailList = T.ToList();
    }
Example #47
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");
    }
Example #48
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();

            DataEntityDataContext context = new DataEntityDataContext();
            FenceXX Model = context.FenceXX.SingleOrDefault(f => f.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.ddl_LX.Items.Add(new ListItem(item.CName, item.CName));
            }
            this.txt_MC.Text = Model.MC;

            string Coords = "";
            txt_Coords.Height = 20;
            string[] CoordsList = Model.Coords.Split(';');
            for (int i = 0, k = 0; i < CoordsList.Length; i++)
            {
                if ((i) % 2 == 0)
                {
                    k++;
                    Coords           += "\r\n";
                    txt_Coords.Height = 20 * k;
                }
                Coords += CoordsList[i] + ";";
            }

            this.txt_Coords.Text = Coords;
            string    FenceUsers = "'" + Model.FenceUser.Replace(",", "','") + "'";
            DataTable dt         = ZWL.DBUtility.DbHelperSQL.GetDataTable("select [TrueName] from ERPUser Where UserName  in (" + FenceUsers + ")");
            string    TrueName   = "";
            foreach (DataRow R in dt.Rows)
            {
                TrueName += TrueName == "" ? R["TrueName"] : "," + R["TrueName"];
            }
            this.txt_FenceUser.Text   = TrueName;
            this.txt_BZ2.Text         = Model.BZ2;
            this.ddl_LX.SelectedValue = Model.LX;
            this.txt_DZ.Text          = Model.DZ;
            this.ZT.SelectedValue     = Model.BZ1;
            ReturnInput.Value         = Request.UrlReferrer.ToString() == null ? "../QDGL/Fence.aspx" : Request.UrlReferrer.ToString();
        }
    }
Example #49
0
    public void DataBindToGridview()
    {
        DataEntityDataContext context = new DataEntityDataContext();

        ZWL.BLL.ERPGongGao MyLanEmail = new ZWL.BLL.ERPGongGao();
        type = Request.QueryString["Type"].ToString().Trim();
        if (Request.QueryString["Type"].ToString().Trim() == "单位")
        {
            var T = context.ERPGongGao.Where(p => p.TypeStr == Request.QueryString["Type"].ToString().Trim()).OrderByDescending(p => p.ID);
            EmailList = T.ToList();
        }
        else
        {
            var T = context.ERPGongGao.Where(p => p.TypeStr == Request.QueryString["Type"].ToString().Trim() && p.UserBuMen == ZWL.Common.PublicMethod.GetSessionValue("Department")).OrderByDescending(p => p.ID);
            EmailList = T.ToList();
        }
    }
Example #50
0
    public void DataBindToGridview()
    {
        DataEntityDataContext context = new DataEntityDataContext();

        ZWL.BLL.ERPGongGao MyLanEmail = new ZWL.BLL.ERPGongGao();
        type = Request.QueryString["Type"].ToString().Trim();
        if (Request.QueryString["Type"].ToString().Trim() == "单位")
        {
            var T = context.ERPGongGao.Where(p => p.TypeStr == "单位").OrderByDescending(p => p.ID);
            EmailList = T.ToList();
        }
        else
        {
            var T = context.ERPGongGao.Where(p => p.TypeStr == "单位").OrderByDescending(p => p.ID);
            EmailList = T.ToList();
        }
    }
Example #51
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");
    }
Example #52
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();

            DataEntityDataContext context = new DataEntityDataContext();
            FenceXX Model = context.FenceXX.SingleOrDefault(f => f.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.ddl_LX.Items.Add(new ListItem(item.CName, item.CName));
            }
            this.txt_MC.Text = Model.MC;

            string Coords = "";
            txt_Coords.Height=20;
            string[] CoordsList= Model.Coords.Split(';');
            for(int i = 0,k = 0; i < CoordsList.Length; i++) {
                if((i) % 2 == 0) {
                    k++;
                    Coords += "\r\n";
                    txt_Coords.Height = 20*k;
                }
                Coords += CoordsList[i]+";";
            }

            this.txt_Coords.Text = Coords;
            string FenceUsers ="'"+ Model.FenceUser.Replace(",","','")+"'";
            DataTable dt = ZWL.DBUtility.DbHelperSQL.GetDataTable("select [TrueName] from ERPUser Where UserName  in (" + FenceUsers + ")");
            string TrueName = "";
            foreach(DataRow R in dt.Rows) {
                TrueName += TrueName == "" ? R["TrueName"] : "," + R["TrueName"];
            }
            this.txt_FenceUser.Text = TrueName;
            this.txt_BZ2.Text = Model.BZ2;
            this.ddl_LX.SelectedValue = Model.LX;
            this.txt_DZ.Text = Model.DZ;
            this.ZT.SelectedValue = Model.BZ1;
            ReturnInput.Value = Request.UrlReferrer.ToString() == null ? "../QDGL/Fence.aspx" : Request.UrlReferrer.ToString();
        }
    }
Example #53
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ZWL.Common.PublicMethod.CheckSession();
         this.txtHeTongName.Attributes.Add("readonly", "true");
         this.txtQianYueKeHu.Attributes.Add("readonly", "true");
         DataEntityDataContext context = new DataEntityDataContext();
         ERPRecive             Model   = new ERPRecive();
         Model = context.ERPRecive.SingleOrDefault(p => p.ID == int.Parse(Request.QueryString["ID"].ToString()));
         this.txtHeTongName.Text    = Model.HeTongName.ToString();
         this.txtQianYueKeHu.Text   = Model.QianYueKeHu.ToString();
         this.txtHeTongMiaoShu.Text = Model.HTJE.ToString();
         this.txtShengXiaoDate.Text = Model.TiXingDate.ToString().Replace(" 0:00:00", "");
         this.txtTiXingDate.Text    = Model.DaoKuanDate.ToString().Replace(" 0:00:00", "");
         this.DZ.Value         = Model.SFDK;
         this.txtBackInfo.Text = Model.BackInfo.ToString();
     }
 }
Example #54
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            //BindTree(this.ListTreeView.Nodes, 0);
            string dirid = "0";
            dirid = ZWL.DBUtility.DbHelperSQL.GetSHSL("select top 1 DirID from ERPBuMen where ID='" + ZWL.Common.PublicMethod.GetSessionValue("DepartmentID") + "'");
            BindTree(this.ListTreeView.Nodes, Convert.ToInt32(dirid));

            //this.txtYuJiTiXing.Text = DateTime.Now.ToString("yyyy-MM-dd")+" 00:00:00";//只选当天记录;
            this.TextBox1.Text = DateTime.Now.ToString();
            ListTreeView.Attributes.Add("onclick ", "OnClientTreeNodeChecked(event) ");
            string uname = Request["username"];
            if ((Request["token"] ?? "") == "ajax" && !string.IsNullOrEmpty(uname) )
            {
                DataEntityDataContext context = new DataEntityDataContext();
                var T = context.WZXX.Where(p => p.ID > 0  && p.XM==uname);

                if (!string.IsNullOrEmpty(Request["stime"]))
                {
                    T = T.Where(p => p.RQ >= DateTime.Parse(Request["stime"]));
                }
                if (!string.IsNullOrEmpty(Request["etime"]))
                {
                    T = T.Where(p => p.RQ <= DateTime.Parse(Request["etime"]));
                }
                T = T.OrderByDescending(p => p.RQ);
                string res = "";
                foreach (var item in T)
                {
                    res += item.X + "," + item.Y + "|";
                }
                Response.Write(res);
                Response.End();
            }
            SettingWorkTime.Visible = ZWL.Common.PublicMethod.StrIFIn("|001A|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            Notice.Visible = ZWL.Common.PublicMethod.StrIFIn("|004|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            AttendanceSel.Visible = ZWL.Common.PublicMethod.StrIFIn("|107|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            WarningSel.Visible = ZWL.Common.PublicMethod.StrIFIn("|109|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
        }
    }
Example #55
0
    public void DataBindToGridview()
    {
        DataEntityDataContext context = new DataEntityDataContext();
        ZWL.BLL.ERPFileList MyLanEmail = new ZWL.BLL.ERPFileList();
        string DirID = "0";
        try
        {
            DirID = Request.QueryString["DirID"].ToString();
        }
        catch { }

        ZWL.BLL.ERPFileList MyModel = new ZWL.BLL.ERPFileList();
        if (Request.QueryString["Type"].ToString().Trim() == "个人文件")
        {

            var T = context.ERPFileList.Where(p => p.UserName == ZWL.Common.PublicMethod.GetSessionValue("UserName") && p.IFDel == "否" && p.TypeName==Request.QueryString["Type"].ToString().Trim() && p.FileType!="dir").OrderByDescending(p => p.ID);
            EmailList = T.ToList();
        }
        else if (Request.QueryString["Type"].ToString().Trim() == "单位文件")
        {
            var T = context.ERPFileList.Where(p => (p.UserName == ZWL.Common.PublicMethod.GetSessionValue("UserName") || p.CanView.Contains(ZWL.Common.PublicMethod.GetSessionValue("UserName"))) && p.IFDel == "否" && p.TypeName == Request.QueryString["Type"].ToString().Trim() && p.FileType != "dir").OrderByDescending(p => p.ID);
            EmailList = T.ToList();

        }
        else if (Request.QueryString["Type"].ToString().Trim() == "知识库")
        {
            var T = context.ERPFileList.Where(p => (p.UserName == ZWL.Common.PublicMethod.GetSessionValue("UserName") || p.CanView.Contains(ZWL.Common.PublicMethod.GetSessionValue("UserName"))) && p.IFDel == "否" && p.TypeName == Request.QueryString["Type"].ToString().Trim()  && p.FileType != "dir").OrderByDescending(p => p.ID);
            EmailList = T.ToList();

        }
        else if (Request.QueryString["Type"].ToString().Trim() == "共享文件")
        {
            var T = context.ERPFileList.Where(p => p.IFDel == "否" && p.IfShare=="是").OrderByDescending(p => p.ID);
            var TT = context.ERPFileList.Where(p=>p.FileType!="dir" && T.Where(c=>c.DirID==p.DirID).Count()>0);
            EmailList = TT.ToList();

        }
    }
Example #56
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>");
    }
Example #57
0
    public void DataBindToGridview()
    {
        DataEntityDataContext context = new DataEntityDataContext();
        ZWL.BLL.ERPTongXunLu MyLanEmail = new ZWL.BLL.ERPTongXunLu();
        type = Request.QueryString["TypeStr"].ToString().Trim();

        if (Request.QueryString["TypeStr"].ToString().Trim() == "公共通讯簿")
        {
            var T = context.ERPTongXunLu.Where(p => p.TypeStr == Request.QueryString["TypeStr"].ToString().Trim()).OrderByDescending(p => p.ID);
            EmailList = T.ToList();
        }
        else if (Request.QueryString["TypeStr"].ToString().Trim() == "个人通讯簿")
        {
            var T = context.ERPTongXunLu.Where(p => p.TypeStr == Request.QueryString["TypeStr"].ToString().Trim() && p.UserName == ZWL.Common.PublicMethod.GetSessionValue("UserName")).OrderByDescending(p => p.ID);
            EmailList = T.ToList();
        }
        else
        {
            //所有共享的通讯录
            var T = context.ERPTongXunLu.Where(p => p.IfShare == "是").OrderByDescending(p => p.ID);
            EmailList = T.ToList();
        }
    }
Example #58
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();

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

            this.lbl_MC.Text = Model.MC;
            string Coords = "";
            string[] CoordsList = Model.Coords.Split(';');
            for(int i = 0; i < CoordsList.Length;i++ ) {
                if((i+1)%4==0) { //换行
                    Coords += CoordsList[i]+ ";" +"<br />";
                }
                else {
                    Coords += CoordsList[i] + ";" + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
                }
            }
            this.lbl_Coords.Text = Coords;
            string FenceUsers = "'" + Model.FenceUser.Replace(",", "','") + "'";
            DataTable dt = ZWL.DBUtility.DbHelperSQL.GetDataTable("select [TrueName] from ERPUser Where UserName  in (" + FenceUsers + ")");
            string TrueName = "";
            foreach(DataRow R in dt.Rows) {
                TrueName += TrueName == "" ? R["TrueName"] : "," + R["TrueName"];
            }
            this.lbl_FenceUser.Text = TrueName;
            this.lbl_BZ2.Text = Model.BZ2;
            this.lbl_LX.Text = Model.LX;
            this.lbl_DZ.Text = Model.DZ;
            this.lbl_ZT.Text = Model.BZ1;
            ReturnInput.Value = Request.UrlReferrer.ToString() == null ? "../QDGL/Fence.aspx" : Request.UrlReferrer.ToString();
        }
    }
Example #59
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ZWL.Common.PublicMethod.CheckSession();
         //绑定页面数据
         DataEntityDataContext context = new DataEntityDataContext();
         var T = context.system_info.SingleOrDefault(p => p.ID == int.Parse(Request.QueryString["ID"].ToString()));
         this.LX.SelectedValue = T.LX;
         this.TextBoxname.Text = T.CJJGSJ.ToString();
         ReturnInput.Value = Request.UrlReferrer.ToString() == null ? "../QDGL/ZXWZ.aspx" : Request.UrlReferrer.ToString();
         //ZWL.Common.PublicMethod.SetSessionValue("WenJianList", MyModel.FuJianStr);
         //ZWL.Common.PublicMethod.BindDDL(this.CheckBoxList1, ZWL.Common.PublicMethod.GetSessionValue("WenJianList"));
     }
 }
Example #60
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();
            //设置上传的附件为空
            ZWL.Common.PublicMethod.SetSessionValue("WenJianList", "");
            DataEntityDataContext context = new DataEntityDataContext();
            var T = context.ERPCommon.Where(p => p.Code == "TZWJLX").OrderBy(p => p.CSort);

            //不是单位通知,那么不显示收阅部门信息
            try {
                this.Send_Person.Value = Request.QueryString["UserName"];
            }
            catch {
            }
            if(Request.UrlReferrer.ToString().IndexOf("Main.aspx") == -1) {
                ReturnInput.Value = Request.UrlReferrer.ToString() == null ? "../GongGao/GongGao.aspx" : Request.UrlReferrer.ToString();
            }
            else {
                ReturnInput.Value = "../GongGao/GongGao.aspx";
            }

            #region  //树状图
            UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
            string Condition = "";
            if(UserName != "") {
                Condition = " where [UserName]='" + UserName + "'";
            }
            string Departments = "";
            DataTable Udt = ZWL.DBUtility.DbHelperSQL.GetDataTable("select [Department] from [ERPUser] " + Condition);
            if(Udt.Rows.Count !=0) {
                Departments = Udt.Rows[0][0].ToString();
            }
            else {
                Departments = "";
            }
            Departments = "'" + Departments.Replace(",", "','") + "'";//拼装IDS,用于SQL语句
            //获取角色的部门
            DataTable BMdt = ZWL.DBUtility.DbHelperSQL.GetDataTable("select [ID],[DirID] from ERPBuMen where [BuMenName] in (" + Departments + ")");

            //foreach(DataRow BMR in BMdt.Rows) {
            //    QIDS += QIDS == "" ? BMR[0].ToString() : "," + BMR[0].ToString(); //获取用户拥有的权限
            //    DataTable Ddt = ZWL.DBUtility.DbHelperSQL.GetDataTable("select [ID] from ERPBuMen where [DirID] in (" + BMR[0].ToString() + ") or  [ID] in (" + BMR[0].ToString() + ") order by [DirID]");
            //    //判断是否有存在下级ID,若存在,则保存在IDS
            //    if(Ddt.Rows.Count > 0) { //若数量大于0.则存在上级菜单
            //        foreach(DataRow DR in Ddt.Rows) {
            //            IDS += IDS == "" ? DR[0].ToString() : "," + DR[0].ToString();
            //        }
            //    }
            //}
            this.ListTreeView.Attributes.Add("onclick", "CheckEvent(event)");
            string dirid = "0";
            dirid = ZWL.DBUtility.DbHelperSQL.GetSHSL("select top 1 DirID from ERPBuMen where ID='" + ZWL.Common.PublicMethod.GetSessionValue("DepartmentID") + "'");
            BindTree(this.ListTreeView.Nodes, Convert.ToInt32(dirid));

            #endregion
        }
    }