private void CheckAndCreateDefaultUserGroup() { if (UserGroupBus.GetCount(Constant.DEFAULT_USER_GROUP_ADMIN_NAME) < 1) { DTO.UserGroup data = new DTO.UserGroup(); data.Ten = Constant.DEFAULT_USER_GROUP_ADMIN_NAME; if (!UserGroupBus.Insert(data)) { MessageBox.Show(Constant.MESSAGE_ERROR, Constant.CAPTION_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } } }
public static bool Delete(UserGroup data) { try { if (data != null) { dbContext.UserGroups.DeleteOnSubmit(data); dbContext.SubmitChanges(); return true; } return false; } catch { //return false; } CreateSQlConnection(); return false; }
public static bool Update(UserGroup data) { return UserGroupDao.Update(data); }
public static bool Insert(UserGroup data) { return UserGroupDao.Insert(data); }
public static bool Delete(UserGroup data) { return UserGroupDao.Delete(data); }
public static bool Update(UserGroup data) { try { if (data != null) { dbContext.SubmitChanges(); return true; } return false; } catch { return false; } }
public static bool Insert(UserGroup data) { try { dbContext.UserGroups.InsertOnSubmit(data); dbContext.SubmitChanges(); return true; } catch { return false; } }
partial void DeleteUserGroup(UserGroup instance);
partial void UpdateUserGroup(UserGroup instance);
partial void InsertUserGroup(UserGroup instance);