コード例 #1
0
 protected override void Edit()
 {
     HPS.BLL.UserGroupBLL.BLLUserGroup_TFactory UserGroupFactory = new HPS.BLL.UserGroupBLL.BLLUserGroup_TFactory();
     try
     {
         HPS.BLL.UserGroupBLL.BLLUserGroup_T UserGroupEntity = new HPS.BLL.UserGroupBLL.BLLUserGroup_T();
         UserGroupEntity.UserGroupID_int = ((HPS.BLL.UserGroupBLL.BLLUserGroup_TKeys)Key).UserGroupID_int;
         UserGroupEntity.Active_bit      = Active_bitCheckBox.Checked;
         UserGroupEntity.UserGroup_nvc   = UserGroup_nvcTextBox.Text;
         string refer = null;
         this.GetPermission(ref refer, this.PermisionTabControl);
         UserGroupEntity.Permission_nvc = refer;
         if (Hepsa.Core.Common.MessageBox.ConfirmMessage(HPS.Exceptions.ExceptionCs.EditMessage) == true)
         {
             UserGroupFactory.BeginProc();
             UserGroupFactory.Update(UserGroupEntity, (HPS.BLL.UserGroupBLL.BLLUserGroup_TKeys)Key);
             UserGroupFactory.CommitProc();
             if (DataTable != null)
             {
                 DataRow[] dr = DataTable.Select(HPS.BLL.UserGroupBLL.BLLUserGroup_T.UserGroup_TField.UserGroupID_int.ToString() + "='" + ((HPS.BLL.UserGroupBLL.BLLUserGroup_TKeys)Key).UserGroupID_int.ToString() + "'");
                 if (dr.Length > 0)
                 {
                     dr[0][HPS.BLL.UserGroupBLL.BLLUserGroup_T.UserGroup_TField.UserGroupID_int.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(UserGroupEntity.UserGroupID_int, TypeCode.Int32);
                     dr[0][HPS.BLL.UserGroupBLL.BLLUserGroup_T.UserGroup_TField.UserGroup_nvc.ToString()]   = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(UserGroupEntity.UserGroup_nvc, TypeCode.String);
                     dr[0][HPS.BLL.UserGroupBLL.BLLUserGroup_T.UserGroup_TField.Permission_nvc.ToString()]  = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(UserGroupEntity.Permission_nvc, TypeCode.String);
                     dr[0][HPS.BLL.UserGroupBLL.BLLUserGroup_T.UserGroup_TField.Active_bit.ToString()]      = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(UserGroupEntity.Active_bit, TypeCode.Boolean);
                 }
                 DataTable.AcceptChanges();
             }
         }
     }
     catch (Exception ex)
     {
         UserGroupFactory.RollBackProc();
         throw ex;
     }
 }