protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ZWL.Common.PublicMethod.CheckSession(); ZWL.DBUtility.DbHelperSQL.BindDropDownList2("select * from ERPJSDIC where UserName='******'", this.DropDownList1, "DicName", "ID"); ZWL.BLL.ERPTelFile MyModel = new ZWL.BLL.ERPTelFile(); MyModel.GetModel(int.Parse(Request.QueryString["ID"].ToString().Trim())); this.Label1.Text = MyModel.TitleStr; this.Label2.Text = MyModel.FromUser; this.Label3.Text = MyModel.TimeStr.ToString(); this.Label4.Text = MyModel.ToUser; this.Label5.Text = MyModel.YiJieShouRen; this.Label6.Text = MyModel.FileType; this.Label7.Text = ZWL.Common.PublicMethod.GetWenJian(MyModel.FuJianStr, "../UploadFile/"); this.Label8.Text = MyModel.ContentStr; this.Label9.Text = MyModel.ChuanYueYiJian; //写系统日志 ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi(); MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyRiZhi.DoSomething = "用户查看文件(" + this.Label1.Text + ")"; MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString(); MyRiZhi.Add(); } }
protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { ZWL.BLL.ERPTelFile MyModel = new ZWL.BLL.ERPTelFile(); MyModel.ChuanYueYiJian = ""; MyModel.FileType = this.TextBox3.Text; MyModel.TimeStr = DateTime.Now; MyModel.TitleStr = this.TextBox1.Text; MyModel.ContentStr = this.TxtContent.Text; MyModel.FuJianStr = ZWL.Common.PublicMethod.GetSessionValue("WenJianList2"); MyModel.FromUser = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyModel.ToUser = this.TextBox2.Text; MyModel.YiJieShouRen = ""; MyModel.ChuanYueHouIDList1 = this.DropDownList1.SelectedItem.Value.ToString(); MyModel.QianShouHouIDList = "0"; MyModel.Zihao = this.TextBoxZihao.Text; MyModel.Add(); //发送短信 SendMainAndSms.SendMessage(CHKSMS, CHKMOB, "您有新的文件需要接收!(" + this.TextBox1.Text + ")", this.TextBox2.Text.Trim()); //写系统日志 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, "传阅文件添加成功!", "SendFile.aspx"); }
public void DataBindToGridview() { ZWL.BLL.ERPTelFile MyERPTelFile = new ZWL.BLL.ERPTelFile(); GVData.DataSource = MyERPTelFile.GetList("TitleStr like '%" + this.TextBox1.Text.Trim() + "%' and FromUser='******' and " + GetDicNameCondition() + " 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(); }
public void DataBindToGridview() { GVData.PageSize = AspNetPager1.PageSize; GVData.PageIndex = AspNetPager1.CurrentPageIndex - 1; ZWL.BLL.ERPTelFile MyERPTelFile = new ZWL.BLL.ERPTelFile(); DataSet ds = MyERPTelFile.GetList("TitleStr like '%" + this.TextBox1.Text.Trim() + "%' and FromUser='******' and " + GetDicNameCondition() + " order by ID desc"); GVData.DataSource = ds; GVData.DataBind(); AspNetPager1.RecordCount = ds.Tables[0].Rows.Count; }