Exemplo n.º 1
0
    public void DataBindToGridview()
    {
        GVData.PageSize  = AspNetPager1.PageSize;
        GVData.PageIndex = AspNetPager1.CurrentPageIndex - 1;
        ZWL.BLL.ERPKaoHeRW MyModel = new ZWL.BLL.ERPKaoHeRW();
        DataSet            ds      = MyModel.GetList("RenWuName Like '%" + this.TextBox1.Text + "%' order by ID desc");

        GVData.DataSource = ds;
        GVData.DataBind();
        AspNetPager1.RecordCount = ds.Tables[0].Rows.Count;
    }
Exemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ZWL.Common.PublicMethod.CheckSession();
         ZWL.BLL.ERPKaoHeRW Model = new ZWL.BLL.ERPKaoHeRW();
         Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
         this.txtRenWuName.Text    = Model.RenWuName.ToString();
         this.txtFenZhi.Text       = Model.FenZhi.ToString();
         this.txtRenWuNeiRong.Text = Model.RenWuNeiRong.ToString();
         this.txtBackInfo.Text     = Model.BackInfo.ToString();
         this.txtUserName.Text     = Model.UserName.ToString();
         this.txtTimeStr.Text      = Model.TimeStr.ToString();
     }
 }
Exemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();
            ZWL.BLL.ERPKaoHeRW Model = new ZWL.BLL.ERPKaoHeRW();
            Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
            this.lblRenWuName.Text    = Model.RenWuName.ToString();
            this.lblFenZhi.Text       = Model.FenZhi.ToString();
            this.lblRenWuNeiRong.Text = Model.RenWuNeiRong.ToString();
            this.lblBackInfo.Text     = Model.BackInfo.ToString();
            this.lblUserName.Text     = Model.UserName.ToString();
            this.lblTimeStr.Text      = Model.TimeStr.ToString();

            //写系统日志
            ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
            MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
            MyRiZhi.DoSomething = "用户查看考核任务信息(" + this.lblRenWuName.Text + ")";
            MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
            MyRiZhi.Add();
        }
    }
Exemplo n.º 4
0
    protected void ImageButton1_Click(object sender, EventArgs e)
    {
        ZWL.BLL.ERPKaoHeRW Model = new ZWL.BLL.ERPKaoHeRW();

        Model.RenWuName    = this.txtRenWuName.Text.ToString();
        Model.FenZhi       = this.txtFenZhi.Text.ToString();
        Model.RenWuNeiRong = this.txtRenWuNeiRong.Text.ToString();
        Model.BackInfo     = this.txtBackInfo.Text.ToString();
        Model.UserName     = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        Model.TimeStr      = DateTime.Now;

        Model.Add();

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

        ZWL.Common.MessageBox.ShowAndRedirect(this, "考核任务信息添加成功!", "KaoHeRW.aspx");
    }
Exemplo n.º 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         if (Request.QueryString["Type"].ToString() == "XM")
         {
             ZWL.BLL.ERPKaoHeXM MyModel = new ZWL.BLL.ERPKaoHeXM();
             DataSet            MYDT    = MyModel.GetList("");
             for (int i = 0; i < MYDT.Tables[0].Rows.Count; i++)
             {
                 this.Label1.Text = this.Label1.Text + "<img src=../images/ico_clip.gif />&nbsp;" + MYDT.Tables[0].Rows[i]["XiangMuName"].ToString() + "&nbsp;&nbsp;&nbsp;&nbsp;所占分值:" + MYDT.Tables[0].Rows[i]["FenZhi"].ToString() + "<BR>";
             }
         }
         else
         {
             ZWL.BLL.ERPKaoHeRW MyModel = new ZWL.BLL.ERPKaoHeRW();
             DataSet            MYDT    = MyModel.GetList("");
             for (int i = 0; i < MYDT.Tables[0].Rows.Count; i++)
             {
                 this.Label1.Text = this.Label1.Text + "<img src=../images/ico_clip.gif />&nbsp;" + MYDT.Tables[0].Rows[i]["RenWuName"].ToString() + "&nbsp;&nbsp;&nbsp;&nbsp;所占分值:" + MYDT.Tables[0].Rows[i]["FenZhi"].ToString() + "<BR>";
             }
         }
     }
 }