using System; using System.Data; using System.Configuration; using System.Collections; using System.Collections.Generic; using System.Drawing; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Net.Mail; using OnMost.Utility.Entity; using OnMost.Utility.BusinessRule;
public partial class E_Mail_Sys_Frm_SentMail : System.Web.UI.UserControl { static public ArrayList hif = new ArrayList(); public int filesUploaded = 0; protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { MstEmpInfoEntity EmpInfoEntity = new MstEmpInfoEntity(); SessionEntity session = (SessionEntity)Session["SysSessionData"]; if (session.BusinessData as MstEmpInfoEntity != null) { EmpInfoEntity = (MstEmpInfoEntity)session.BusinessData; if (EmpInfoEntity.Mail != "") { this.txtmailto.Text = (EmpInfoEntity.Mail).Substring(0, (EmpInfoEntity.Mail).Length - 1); } } } } /// <summary> /// 初始化控件 /// </summary> public void Pageload() { this.txtmailto.Text = string.Empty; this.txtmailtitle.Text = string.Empty; this.txtmailcontent.Value = string.Empty; this.lbFile.Items.Clear(); hif.Clear(); } /// <summary> /// 增加附件 /// </summary> /// <param name="sender"> </param> /// <param name="e"> </param> protected void AddFile(object sender, EventArgs e) { if (Page.IsPostBack == true) { try { hif.Add(FindFile); lbFile.Items.Add(FindFile.PostedFile.FileName); } catch(System.Exception ex) { lblErr.Text = ex.Message; } }