Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ZWL.Common.PublicMethod.CheckSession();
         //绑定页面数据
         ZWL.BLL.ERPTongXunLu Model = new ZWL.BLL.ERPTongXunLu();
         Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
         this.RadioButtonList1.SelectedValue = Model.IfShare;
         this.TextBox1.Text   = Model.FenZu;
         this.TextBox2.Text   = Model.NameStr;
         this.TextBox3.Text   = Model.Sex;
         this.TextBox4.Text   = Model.BirthDay;
         this.TextBox5.Text   = Model.NiCheng;
         this.TextBox6.Text   = Model.ZhiWu;
         this.TextBox7.Text   = Model.PeiOu;
         this.TextBox8.Text   = Model.ZiNv;
         this.TextBox9.Text   = Model.DanWeiMingCheng;
         this.TextBox10.Text  = Model.DanWeiDiZhi;
         this.TextBox11.Text  = Model.DanWeiYouBian;
         this.TextBox12.Text  = Model.DanWieDianHua;
         this.TextBox13.Text  = Model.DanWeiChuanZhen;
         this.TextBox14.Text  = Model.JiaTingZhuZhi;
         this.TextBox15.Text  = Model.JiaTingYouBian;
         this.TextBox16.Text  = Model.JiaTingDianHua;
         this.TextBox17.Text  = Model.ShouJi;
         this.TextBox18.Text  = Model.XiaoLingTong;
         this.TextBox19.Text  = Model.Email;
         this.TextBox20.Text  = Model.QQ;
         this.TextBox21.Text  = Model.Msn;
         this.TxtContent.Text = Model.BackInfo;
     }
 }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ZWL.Common.PublicMethod.CheckSession();
         //绑定页面数据
         ZWL.BLL.ERPTongXunLu Model = new ZWL.BLL.ERPTongXunLu();
         Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
         this.Label2.Text  = Model.IfShare;
         this.Label1.Text  = Model.FenZu;
         this.Label3.Text  = Model.NameStr;
         this.Label4.Text  = Model.Sex;
         this.Label5.Text  = Model.BirthDay;
         this.Label6.Text  = Model.NiCheng;
         this.Label7.Text  = Model.ZhiWu;
         this.Label8.Text  = Model.PeiOu;
         this.Label9.Text  = Model.ZiNv;
         this.Label10.Text = Model.DanWeiMingCheng;
         this.Label11.Text = Model.DanWeiDiZhi;
         this.Label12.Text = Model.DanWeiYouBian;
         this.Label13.Text = Model.DanWieDianHua;
         this.Label14.Text = Model.DanWeiChuanZhen;
         this.Label15.Text = Model.JiaTingZhuZhi;
         this.Label16.Text = Model.JiaTingYouBian;
         this.Label17.Text = Model.JiaTingDianHua;
         this.Label18.Text = Model.ShouJi;
         this.Label19.Text = Model.XiaoLingTong;
         this.Label20.Text = Model.Email;
         this.Label21.Text = Model.QQ;
         this.Label22.Text = Model.Msn;
         this.Label23.Text = Model.BackInfo;
     }
 }
Ejemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ZWL.Common.PublicMethod.CheckSession();
         //绑定页面数据
         ZWL.BLL.ERPTongXunLu Model = new ZWL.BLL.ERPTongXunLu();
         Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
         this.RadioButtonList1.SelectedValue = Model.IfShare;
         this.TextBox1.Text = Model.FenZu;
         this.TextBox2.Text = Model.NameStr;
         this.TextBox3.Text = Model.Sex;
         this.TextBox4.Text = Model.BirthDay;
         this.TextBox5.Text = Model.NiCheng;
         this.TextBox6.Text = Model.ZhiWu;
         this.TextBox7.Text = Model.PeiOu;
         this.TextBox8.Text = Model.ZiNv;
         this.TextBox9.Text = Model.DanWeiMingCheng;
         this.TextBox10.Text = Model.DanWeiDiZhi;
         this.TextBox11.Text = Model.DanWeiYouBian;
         this.TextBox12.Text = Model.DanWieDianHua;
         this.TextBox13.Text = Model.DanWeiChuanZhen;
         this.TextBox14.Text = Model.JiaTingZhuZhi;
         this.TextBox15.Text = Model.JiaTingYouBian;
         this.TextBox16.Text = Model.JiaTingDianHua;
         this.TextBox17.Text = Model.ShouJi;
         this.TextBox18.Text = Model.XiaoLingTong;
         this.TextBox19.Text = Model.Email;
         this.TextBox20.Text = Model.QQ;
         this.TextBox21.Text = Model.Msn;
         this.TxtContent.Text = Model.BackInfo;
     }
 }
Ejemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ZWL.Common.PublicMethod.CheckSession();
         //绑定页面数据
         ZWL.BLL.ERPTongXunLu Model = new ZWL.BLL.ERPTongXunLu();
         Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
         this.Label2.Text = Model.IfShare;
         this.Label1.Text = Model.FenZu;
         this.Label3.Text = Model.NameStr;
         this.Label4.Text = Model.Sex;
         this.Label5.Text = Model.BirthDay;
         this.Label6.Text = Model.NiCheng;
         this.Label7.Text = Model.ZhiWu;
         this.Label8.Text = Model.PeiOu;
         this.Label9.Text = Model.ZiNv;
         this.Label10.Text = Model.DanWeiMingCheng;
         this.Label11.Text = Model.DanWeiDiZhi;
         this.Label12.Text = Model.DanWeiYouBian;
         this.Label13.Text = Model.DanWieDianHua;
         this.Label14.Text = Model.DanWeiChuanZhen;
         this.Label15.Text = Model.JiaTingZhuZhi;
         this.Label16.Text = Model.JiaTingYouBian;
         this.Label17.Text = Model.JiaTingDianHua;
         this.Label18.Text = Model.ShouJi;
         this.Label19.Text = Model.XiaoLingTong;
         this.Label20.Text = Model.Email;
         this.Label21.Text = Model.QQ;
         this.Label22.Text = Model.Msn;
         this.Label23.Text = Model.BackInfo;
     }
 }
Ejemplo n.º 5
0
    public void DataBindToGridview()
    {
        ZWL.BLL.ERPTongXunLu MyModel = new ZWL.BLL.ERPTongXunLu();
        DataSet ds = new DataSet();

        if (Request.QueryString["TypeStr"].ToString().Trim() == "公共通讯簿")
        {
            ds = MyModel.GetList("TypeStr='" + Request.QueryString["TypeStr"].ToString().Trim() + "' and NameStr Like '%" + this.TextBox1.Text + "%' order by ID desc");

            //设定按钮权限
            ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|008A|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|008M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|008D|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|008E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
        }
        else if (Request.QueryString["TypeStr"].ToString().Trim() == "个人通讯簿")
        {
            ds = MyModel.GetList("TypeStr='" + Request.QueryString["TypeStr"].ToString().Trim() + "' and UserName='******' and NameStr Like '%" + this.TextBox1.Text + "%' order by ID desc");
            //设定按钮权限
            ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|010A|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|010M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|010D|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|010E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
        }
        else
        {
            //所有共享的通讯录
            ds = MyModel.GetList("IfShare='是' and NameStr Like '%" + this.TextBox1.Text + "%' order by ID desc");
            //隐藏添加、修改、删除
            this.ImageButton1.Visible = false;
            this.ImageButton5.Visible = false;
            this.ImageButton3.Visible = false;
            //设定按钮权限
            ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|009E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
        }
        if (ds != null)
        {
            GVData.DataSource = ds;
            GVData.DataBind();
            LabPageSum.Text     = Convert.ToString(GVData.PageCount);
            LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
            this.GoPage.Text    = LabCurrentPage.Text.ToString();
        }
    }
Ejemplo n.º 6
0
    public void DataBindToGridview()
    {
        ZWL.BLL.ERPTongXunLu MyModel = new ZWL.BLL.ERPTongXunLu();
        DataSet ds = new DataSet();
        if (Request.QueryString["TypeStr"].ToString().Trim() == "公共通讯簿")
        {
            ds = MyModel.GetList("TypeStr='" + Request.QueryString["TypeStr"].ToString().Trim() + "' and NameStr Like '%" + this.TextBox1.Text + "%' order by ID desc");

            //设定按钮权限
            ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|008A|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|008M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|008D|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|008E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
        }
        else if (Request.QueryString["TypeStr"].ToString().Trim() == "个人通讯簿")
        {
           ds = MyModel.GetList("TypeStr='" + Request.QueryString["TypeStr"].ToString().Trim() + "' and UserName='******' and NameStr Like '%" + this.TextBox1.Text + "%' order by ID desc");
            //设定按钮权限
            ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|010A|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|010M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|010D|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|010E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
        }
        else
        {
            //所有共享的通讯录
            ds = MyModel.GetList("IfShare='是' and NameStr Like '%" + this.TextBox1.Text + "%' order by ID desc");
            //隐藏添加、修改、删除
            this.ImageButton1.Visible = false;
            this.ImageButton5.Visible = false;
            this.ImageButton3.Visible = false;
            //设定按钮权限
            ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|009E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
        }
        if (ds != null)
        {
            GVData.DataSource = ds;
            GVData.DataBind();
            LabPageSum.Text = Convert.ToString(GVData.PageCount);
            LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
            this.GoPage.Text = LabCurrentPage.Text.ToString();
        }
    }
Ejemplo n.º 7
0
    public void DataBindToGridview()
    {
        GVData.PageSize  = AspNetPager1.PageSize;
        GVData.PageIndex = AspNetPager1.CurrentPageIndex - 1;
        ZWL.BLL.ERPTongXunLu MyModel = new ZWL.BLL.ERPTongXunLu();
        DataSet ds = new DataSet();

        if (Request.QueryString["TypeStr"].ToString().Trim() == "公共通讯簿")
        {
            ds = MyModel.GetList("TypeStr='" + Request.QueryString["TypeStr"].ToString().Trim() + "' and NameStr Like '%" + this.TextBox1.Text + "%' order by ID desc");

            //设定按钮权限
            ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|015a|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|015m|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|015d|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|015e|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
        }
        else if (Request.QueryString["TypeStr"].ToString().Trim() == "个人通讯簿")
        {
            ds = MyModel.GetList("TypeStr='" + Request.QueryString["TypeStr"].ToString().Trim() + "' and UserName='******' and NameStr Like '%" + this.TextBox1.Text + "%' order by ID desc");
            //设定按钮权限
            ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|017a|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|017m|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|017d|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
            ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|017e|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
        }
        else
        {
            //所有共享的通讯录
            ds = MyModel.GetList("IfShare='是' and NameStr Like '%" + this.TextBox1.Text + "%' order by ID desc");
            //隐藏添加、修改、删除
            this.ImageButton1.Visible = false;
            this.ImageButton5.Visible = false;
            this.ImageButton3.Visible = false;
            //设定按钮权限
            ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|016e|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
        }
        GVData.DataSource = ds;
        GVData.DataBind();
        AspNetPager1.RecordCount = ds.Tables[0].Rows.Count;
    }
Ejemplo n.º 8
0
    protected void ImageButton1_Click(object sender, EventArgs e)
    {
        ZWL.BLL.ERPTongXunLu Model = new ZWL.BLL.ERPTongXunLu();
        Model.ID              = int.Parse(Request.QueryString["ID"].ToString());
        Model.UserName        = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        Model.IfShare         = this.RadioButtonList1.SelectedItem.Text;
        Model.TypeStr         = Request.QueryString["TypeStr"].ToString();
        Model.FenZu           = this.TextBox1.Text.Trim();
        Model.NameStr         = this.TextBox2.Text.Trim();
        Model.Sex             = this.TextBox3.Text.Trim();
        Model.BirthDay        = this.TextBox4.Text.Trim();
        Model.NiCheng         = this.TextBox5.Text.Trim();
        Model.ZhiWu           = this.TextBox6.Text.Trim();
        Model.PeiOu           = this.TextBox7.Text.Trim();
        Model.ZiNv            = this.TextBox8.Text.Trim();
        Model.DanWeiMingCheng = this.TextBox9.Text.Trim();
        Model.DanWeiDiZhi     = this.TextBox10.Text.Trim();
        Model.DanWeiYouBian   = this.TextBox11.Text.Trim();
        Model.DanWieDianHua   = this.TextBox12.Text.Trim();
        Model.DanWeiChuanZhen = this.TextBox13.Text.Trim();
        Model.JiaTingZhuZhi   = this.TextBox14.Text.Trim();
        Model.JiaTingYouBian  = this.TextBox15.Text.Trim();
        Model.JiaTingDianHua  = this.TextBox16.Text.Trim();
        Model.ShouJi          = this.TextBox17.Text.Trim();
        Model.XiaoLingTong    = this.TextBox18.Text.Trim();
        Model.Email           = this.TextBox19.Text.Trim();
        Model.QQ              = this.TextBox20.Text.Trim();
        Model.Msn             = this.TextBox21.Text.Trim();
        Model.BackInfo        = this.TxtContent.Text;
        Model.Update();

        //写系统日志
        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();

        ZWL.Common.MessageBox.ShowAndRedirect(this, "联系人信息修改成功!", "TongXunLu.aspx?TypeStr=" + Request.QueryString["TypeStr"].ToString());
    }
Ejemplo n.º 9
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        ZWL.BLL.ERPTongXunLu Model = new ZWL.BLL.ERPTongXunLu();
        Model.ID = int.Parse(Request.QueryString["ID"].ToString());
        Model.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        Model.IfShare = this.RadioButtonList1.SelectedItem.Text;
        Model.TypeStr = Request.QueryString["TypeStr"].ToString();
        Model.FenZu = this.TextBox1.Text.Trim();
        Model.NameStr = this.TextBox2.Text.Trim();
        Model.Sex = this.TextBox3.Text.Trim();
        Model.BirthDay = this.TextBox4.Text.Trim();
        Model.NiCheng = this.TextBox5.Text.Trim();
        Model.ZhiWu = this.TextBox6.Text.Trim();
        Model.PeiOu = this.TextBox7.Text.Trim();
        Model.ZiNv = this.TextBox8.Text.Trim();
        Model.DanWeiMingCheng = this.TextBox9.Text.Trim();
        Model.DanWeiDiZhi = this.TextBox10.Text.Trim();
        Model.DanWeiYouBian = this.TextBox11.Text.Trim();
        Model.DanWieDianHua = this.TextBox12.Text.Trim();
        Model.DanWeiChuanZhen = this.TextBox13.Text.Trim();
        Model.JiaTingZhuZhi = this.TextBox14.Text.Trim();
        Model.JiaTingYouBian = this.TextBox15.Text.Trim();
        Model.JiaTingDianHua = this.TextBox16.Text.Trim();
        Model.ShouJi = this.TextBox17.Text.Trim();
        Model.XiaoLingTong = this.TextBox18.Text.Trim();
        Model.Email = this.TextBox19.Text.Trim();
        Model.QQ = this.TextBox20.Text.Trim();
        Model.Msn = this.TextBox21.Text.Trim();
        Model.BackInfo = this.TxtContent.Text;
        Model.Update();

        //写系统日志
        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();

        ZWL.Common.MessageBox.ShowAndRedirect(this, "联系人信息修改成功!", "TongXunLu.aspx?TypeStr=" + Request.QueryString["TypeStr"].ToString());
    }
Ejemplo n.º 10
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();
        }
    }
Ejemplo n.º 11
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();
        }
    }