コード例 #1
0
ファイル: BaoXiaoShenQing.aspx.cs プロジェクト: chocoai/YOA
 public void DataBindToGridview()
 {
     ZWL.BLL.ERPBaoXiao MyModel = new ZWL.BLL.ERPBaoXiao();
     GVData.DataSource = MyModel.GetList("ProjectName 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();
 }
コード例 #2
0
ファイル: BaoXiaoAdd.aspx.cs プロジェクト: YJGGIT422/OAweb
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        ZWL.BLL.ERPBaoXiao model = new ZWL.BLL.ERPBaoXiao();
        model.ProjectName     = this.txtProjectName.Text;
        model.FeiYongType     = this.txtFeiYongType.Text;
        model.ShenQingRen     = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        model.ShenPiRen       = this.txtShenPiRen.Text;
        model.ShenQingContent = this.txtShenQingContent.Text;
        model.JinE            = this.txtJinE.Text;
        model.StateNow        = "待批";
        model.Username        = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        model.ShenQingTime    = DateTime.Now;;
        model.Add();

        //写系统日志
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "用户添加报销申请(" + this.txtProjectName.Text + ")";
        MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();
        ZWL.Common.MessageBox.ShowAndRedirect(this, "报销申请添加成功!", "BaoXiaoShenQing.aspx?ProjectName=" + Request.QueryString["ProjectName"].ToString());
    }