protected void cmdDelete_Click(object sender, EventArgs e) { LinkButton cmd = sender as LinkButton; if (cmd == null) { return; } string area = cmd.Attributes["area"]; if (string.IsNullOrEmpty(area) || area.Trim().Length <= 0) { return; } try { using (ISession session = new Session()) { INVCheckHead head = INVCheckHead.Retrieve(session, this.OrderNumber); try { session.BeginTransaction(); head.RemoveArea(session, area); session.Commit(); this.BindArea(session, head); this.QueryAndBindData(session, head); } catch (Exception err) { session.Rollback(); WebUtil.ShowError(this, err); return; } } } catch (Exception er) { WebUtil.ShowError(this, er); } }