Exemple #1
0
 public void DataBindToGridview()
 {
     DataEntityDataContext context = new DataEntityDataContext();
     ZWL.BLL.ERPWorkRiZhi MyLanEmail = new ZWL.BLL.ERPWorkRiZhi();
     var T = context.ERPWorkRiZhi.Where(p => p.UserName == ZWL.Common.PublicMethod.GetSessionValue("UserName")).OrderByDescending(p => p.ID);
     EmailList = T.ToList();
 }
Exemple #2
0
 public void DataBindToGridview()
 {
     ZWL.BLL.ERPWorkRiZhi MyModel = new ZWL.BLL.ERPWorkRiZhi();
     GVData.DataSource = MyModel.GetList("TitleStr Like '%" + this.TextBox1.Text + "%' and UserName='******' order by ID desc");
     GVData.DataBind();
     LabPageSum.Text     = Convert.ToString(GVData.PageCount);
     LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
     this.GoPage.Text    = LabCurrentPage.Text.ToString();
 }
Exemple #3
0
    public void DataBindToGridview()
    {
        DataEntityDataContext context = new DataEntityDataContext();

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

        EmailList = T.ToList();
    }
Exemple #4
0
    public void DataBindToGridview()
    {
        GVData.PageSize  = AspNetPager1.PageSize;
        GVData.PageIndex = AspNetPager1.CurrentPageIndex - 1;
        ZWL.BLL.ERPWorkRiZhi MyModel = new ZWL.BLL.ERPWorkRiZhi();
        DataSet ds = MyModel.GetList("TitleStr Like '%" + this.TextBox1.Text + "%' and UserName='******' order by ID desc");

        GVData.DataSource = ds;
        GVData.DataBind();
        AspNetPager1.RecordCount = ds.Tables[0].Rows.Count;
    }
Exemple #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ZWL.Common.PublicMethod.CheckSession();
         //绑定页面数据
         ZWL.BLL.ERPWorkRiZhi Model = new ZWL.BLL.ERPWorkRiZhi();
         Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
         this.TextBox1.Text = Model.TitleStr;
         ReturnInput.Value  = Request.UrlReferrer.ToString() == null ? "../Work/WorkRiZhi.aspx" : Request.UrlReferrer.ToString();
     }
 }
Exemple #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ZWL.Common.PublicMethod.CheckSession();
         //绑定页面数据
         ZWL.BLL.ERPWorkRiZhi Model = new ZWL.BLL.ERPWorkRiZhi();
         Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
         this.TextBox1.Text = Model.TitleStr;
         ReturnInput.Value = Request.UrlReferrer.ToString() == null ? "../Work/WorkRiZhi.aspx" : Request.UrlReferrer.ToString();
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ZWL.Common.PublicMethod.CheckSession();
         //绑定页面数据
         ZWL.BLL.ERPWorkRiZhi Model = new ZWL.BLL.ERPWorkRiZhi();
         Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
         this.Label1.Text = Model.TitleStr;
         this.Label3.Text = Model.ContentStr;
         this.Label2.Text = Model.TypeStr;
     }
 }
Exemple #8
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();
 }
Exemple #9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ZWL.Common.PublicMethod.CheckSession();
         //绑定页面数据
         ZWL.BLL.ERPWorkRiZhi Model = new ZWL.BLL.ERPWorkRiZhi();
         Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
         this.TextBox1.Text = Model.TitleStr;
         this.TxtContent.Text = Model.ContentStr;
         this.TextBox5.Text = Model.TypeStr;
     }
 }
Exemple #10
0
    public void DataBindToGridview()
    {
        ZWL.BLL.ERPWorkRiZhi MyModel = new ZWL.BLL.ERPWorkRiZhi();
        DataSet ds = new DataSet();
        ds = MyModel.GetList("TitleStr Like '%" + this.TextBox1.Text + "%' and UserName='******' order by ID desc");
        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();
        }
    }
Exemple #11
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();
    }
Exemple #12
0
    public void DataBindToGridview()
    {
        string XiaShuUser = ZWL.DBUtility.DbHelperSQL.GetSHSLInt("select top 1 XiaShuUser from ERPUser where UserName='******'");
        string SSTempSTR = "";
        if (XiaShuUser != "全部")
        {
            SSTempSTR = "and UserName in(" + "'" + XiaShuUser.Replace(",", "','") + "'" + ")";
        }

        ZWL.BLL.ERPWorkRiZhi MyModel = new ZWL.BLL.ERPWorkRiZhi();
        GVData.DataSource = MyModel.GetList("TitleStr Like '%" + this.TextBox1.Text + "%' and UserName like '%" + this.TextBox2.Text + "%' " + SSTempSTR + " order by ID desc");
        GVData.DataBind();
        LabPageSum.Text = Convert.ToString(GVData.PageCount);
        LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
        this.GoPage.Text = LabCurrentPage.Text.ToString();
    }
Exemple #13
0
    public void DataBindToGridview()
    {
        string XiaShuUser = ZWL.DBUtility.DbHelperSQL.GetSHSLInt("select top 1 XiaShuUser from ERPUser where UserName='******'");
        string SSTempSTR  = "";

        if (XiaShuUser != "全部")
        {
            SSTempSTR = "and UserName in(" + "'" + XiaShuUser.Replace(",", "','") + "'" + ")";
        }

        ZWL.BLL.ERPWorkRiZhi MyModel = new ZWL.BLL.ERPWorkRiZhi();
        GVData.DataSource = MyModel.GetList("TitleStr Like '%" + this.TextBox1.Text + "%' and UserName like '%" + this.TextBox2.Text + "%' " + SSTempSTR + " order by ID desc");
        GVData.DataBind();
        LabPageSum.Text     = Convert.ToString(GVData.PageCount);
        LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
        this.GoPage.Text    = LabCurrentPage.Text.ToString();
    }
Exemple #14
0
    protected void btn_Sub_Click(object sender, EventArgs e)
    {
        ZWL.BLL.ERPWorkRiZhi Model = new ZWL.BLL.ERPWorkRiZhi();
        Model.TitleStr   = this.TextBox1.Text;
        Model.ContentStr = "";
        Model.TypeStr    = ZWL.Common.PublicMethod.GetSessionValue("Department");
        Model.TimeStr    = DateTime.Now;
        Model.UserName   = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        Model.Add();

        //写系统日志
        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, "分享信息添加成功!", "WorkRiZhi.aspx");
    }
Exemple #15
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        ZWL.BLL.ERPWorkRiZhi Model = new ZWL.BLL.ERPWorkRiZhi();
        Model.TitleStr   = this.TextBox1.Text;
        Model.ContentStr = this.TxtContent.Text;
        Model.TypeStr    = this.TextBox5.Text.Trim();
        Model.ID         = int.Parse(Request.QueryString["ID"].ToString());
        Model.UserName   = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        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, "工作日志修改成功!", "WorkRiZhi.aspx");
    }
Exemple #16
0
    protected void btn_Sub_Click(object sender, EventArgs e)
    {
        ZWL.BLL.ERPWorkRiZhi Model = new ZWL.BLL.ERPWorkRiZhi();
        Model.TitleStr = this.TextBox1.Text;
        Model.ContentStr = "";
        Model.TypeStr = ZWL.Common.PublicMethod.GetSessionValue("Department");
        Model.TimeStr = DateTime.Now;
        Model.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        Model.Add();

        //写系统日志
        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, "分享信息添加成功!", "WorkRiZhi.aspx");
    }
Exemple #17
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        ZWL.BLL.ERPWorkRiZhi Model = new ZWL.BLL.ERPWorkRiZhi();
        Model.TitleStr = this.TextBox1.Text;
        Model.ContentStr = this.TxtContent.Text;
        Model.TypeStr = this.TextBox5.Text.Trim();
        Model.ID = int.Parse(Request.QueryString["ID"].ToString());
        Model.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        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, "工作日志修改成功!", "WorkRiZhi.aspx");
    }