protected override void Insert() { HPS.BLL.UserGroupBLL.BLLUserGroup_TFactory UserGroupFactory = new HPS.BLL.UserGroupBLL.BLLUserGroup_TFactory(); HPS.BLL.UserGroupBLL.BLLUserGroup_T UserGroupEntity = new HPS.BLL.UserGroupBLL.BLLUserGroup_T(); HPS.BLL.UserGroupBLL.BLLUserGroup_TKeys UserGroupKey = new HPS.BLL.UserGroupBLL.BLLUserGroup_TKeys(); try { UserGroupEntity.Active_bit = this.Active_bitCheckBox.Checked; string refer = null; this.GetPermission(ref refer, this.PermisionTabControl); UserGroupEntity.Permission_nvc = refer; UserGroupEntity.UserGroup_nvc = this.UserGroup_nvcTextBox.Text; UserGroupFactory.BeginProc(); UserGroupFactory.Insert(UserGroupEntity); UserGroupFactory.CommitProc(); if (DataTable != null) { DataRow dr = this.DataTable.NewRow(); dr[HPS.BLL.UserGroupBLL.BLLUserGroup_T.UserGroup_TField.UserGroupID_int.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(UserGroupEntity.UserGroupID_int, TypeCode.Int32); dr[HPS.BLL.UserGroupBLL.BLLUserGroup_T.UserGroup_TField.UserGroup_nvc.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(UserGroupEntity.UserGroup_nvc, TypeCode.String); dr[HPS.BLL.UserGroupBLL.BLLUserGroup_T.UserGroup_TField.Permission_nvc.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(UserGroupEntity.Permission_nvc, TypeCode.String); dr[HPS.BLL.UserGroupBLL.BLLUserGroup_T.UserGroup_TField.Active_bit.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(UserGroupEntity.Active_bit, TypeCode.Boolean); DataTable.Rows.Add(dr); DataTable.AcceptChanges(); } this.ClearForm(this); } catch (Exception ex) { UserGroupFactory.RollBackProc(); throw ex; } }