示例#1
0
        protected override void OnClosed(EventArgs e)
        {
            base.OnClosed(e);
            if (this.session != null)
            {
                this.session.Dispose();
                this.session = null;
            }

            if (Attachments?.Any() ?? false)
            {
                Attachments.ForEach(x =>
                {
                    if (x.ContentStream != null)
                    {
                        x.ContentStream.Dispose();
                    }
                });

                Attachments.Clear();
            }
        }
示例#2
0
 public TowaryView(BAL.Business.Session session)
     : base(session.Tables["Towary"])
 {
 }