public override global::System.Data.DataTable Clone() { RoleDataTable cln = ((RoleDataTable)(base.Clone())); cln.InitVars(); return(cln); }
public override DataTable Clone() { RoleDataTable cln = ((RoleDataTable)(base.Clone())); cln.InitVars(); return(cln); }
private void InitClass() { this.DataSetName = "DsRole"; this.Prefix = ""; this.Namespace = "http://tempuri.org/DsRole.xsd"; this.EnforceConstraints = true; this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; this.tableRole = new RoleDataTable(); base.Tables.Add(this.tableRole); }
internal void InitVars(bool initTable) { this.tableRole = ((RoleDataTable)(base.Tables["Role"])); if ((initTable == true)) { if ((this.tableRole != null)) { this.tableRole.InitVars(); } } }
/// <summary> /// Implement method GetRoleDataTable of interface /// </summary> /// <returns></returns> public RoleDataTable GetRoleDataTable() { //Get data in database var roles = _roleRepository.GetAll(); //Convert into Viewmodel var roleViewModels = _mapper.Map <IEnumerable <IdentityRole>, IEnumerable <RoleViewModel> >(roles); var result = new RoleDataTable() { Data = roleViewModels.ToList(), Total = roleViewModels.Count(), }; return(result); }
private void InitClass() { this.DataSetName = "Users"; this.Prefix = ""; this.Namespace = "http://tempuri.org/Users.xsd"; this.Locale = new System.Globalization.CultureInfo("en-US"); this.CaseSensitive = false; this.EnforceConstraints = false; this.tableUser = new UserDataTable(); this.Tables.Add(this.tableUser); this.tableUserRole = new UserRoleDataTable(); this.Tables.Add(this.tableUserRole); this.tableRole = new RoleDataTable(); this.Tables.Add(this.tableRole); ForeignKeyConstraint fkc; fkc = new ForeignKeyConstraint("User_UserRole", new DataColumn[] { this.tableUser.loginColumn }, new DataColumn[] { this.tableUserRole.loginColumn }); this.tableUserRole.Constraints.Add(fkc); fkc.AcceptRejectRule = AcceptRejectRule.None; fkc.DeleteRule = Rule.Cascade; fkc.UpdateRule = Rule.Cascade; fkc = new ForeignKeyConstraint("RoleUserRole", new DataColumn[] { this.tableRole.nameColumn }, new DataColumn[] { this.tableUserRole.nameColumn }); this.tableUserRole.Constraints.Add(fkc); fkc.AcceptRejectRule = AcceptRejectRule.Cascade; fkc.DeleteRule = Rule.Cascade; fkc.UpdateRule = Rule.Cascade; this.relationUser_UserRole = new DataRelation("User_UserRole", new DataColumn[] { this.tableUser.loginColumn }, new DataColumn[] { this.tableUserRole.loginColumn }, false); this.relationUser_UserRole.Nested = true; this.Relations.Add(this.relationUser_UserRole); this.relationRoleUserRole = new DataRelation("RoleUserRole", new DataColumn[] { this.tableRole.nameColumn }, new DataColumn[] { this.tableUserRole.nameColumn }, false); this.Relations.Add(this.relationRoleUserRole); }
internal void InitVars() { this.tableUser = ((UserDataTable)(this.Tables["User"])); if ((this.tableUser != null)) { this.tableUser.InitVars(); } this.tableUserRole = ((UserRoleDataTable)(this.Tables["UserRole"])); if ((this.tableUserRole != null)) { this.tableUserRole.InitVars(); } this.tableRole = ((RoleDataTable)(this.Tables["Role"])); if ((this.tableRole != null)) { this.tableRole.InitVars(); } this.relationUser_UserRole = this.Relations["User_UserRole"]; this.relationRoleUserRole = this.Relations["RoleUserRole"]; }
internal RoleRow(DataRowBuilder rb) : base(rb) { this.tableRole = ((RoleDataTable)(this.Table)); }
internal RoleRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tableRole = ((RoleDataTable)(this.Table)); }
private void InitClass() { this.DataSetName = "UserDS"; this.Prefix = ""; this.Namespace = "http://tempuri.org/UserDS.xsd"; this.EnforceConstraints = true; this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; this.tableRole = new RoleDataTable(); base.Tables.Add(this.tableRole); this.tableUser = new UserDataTable(); base.Tables.Add(this.tableUser); this.tableUserRole = new UserRoleDataTable(); base.Tables.Add(this.tableUserRole); global::System.Data.ForeignKeyConstraint fkc; fkc = new global::System.Data.ForeignKeyConstraint("FK_User_Supervisor", new global::System.Data.DataColumn[] { this.tableUser.IDColumn}, new global::System.Data.DataColumn[] { this.tableUser.SupervisorIDColumn}); this.tableUser.Constraints.Add(fkc); fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None; fkc.DeleteRule = global::System.Data.Rule.None; fkc.UpdateRule = global::System.Data.Rule.None; fkc = new global::System.Data.ForeignKeyConstraint("FK_UserRole_User", new global::System.Data.DataColumn[] { this.tableUser.IDColumn}, new global::System.Data.DataColumn[] { this.tableUserRole.UserIDColumn}); this.tableUserRole.Constraints.Add(fkc); fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None; fkc.DeleteRule = global::System.Data.Rule.None; fkc.UpdateRule = global::System.Data.Rule.None; fkc = new global::System.Data.ForeignKeyConstraint("FK_UserRole_Role", new global::System.Data.DataColumn[] { this.tableRole.IDColumn}, new global::System.Data.DataColumn[] { this.tableUserRole.RoleIDColumn}); this.tableUserRole.Constraints.Add(fkc); fkc.AcceptRejectRule = global::System.Data.AcceptRejectRule.None; fkc.DeleteRule = global::System.Data.Rule.None; fkc.UpdateRule = global::System.Data.Rule.None; }
internal void InitVars(bool initTable) { this.tableRole = ((RoleDataTable)(base.Tables["Role"])); if ((initTable == true)) { if ((this.tableRole != null)) { this.tableRole.InitVars(); } } this.tableUser = ((UserDataTable)(base.Tables["User"])); if ((initTable == true)) { if ((this.tableUser != null)) { this.tableUser.InitVars(); } } this.tableUserRole = ((UserRoleDataTable)(base.Tables["UserRole"])); if ((initTable == true)) { if ((this.tableUserRole != null)) { this.tableUserRole.InitVars(); } } }
internal RoleRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tableRole = ((RoleDataTable)(this.Table)); }
internal RoleRow(DataRowBuilder rb) : base(rb) { this.tableRole = ((RoleDataTable)(this.Table)); }
private void InitClass() { this.DataSetName = "Users"; this.Prefix = ""; this.Namespace = "http://tempuri.org/Users.xsd"; this.Locale = new System.Globalization.CultureInfo("en-US"); this.CaseSensitive = false; this.EnforceConstraints = false; this.tableUser = new UserDataTable(); this.Tables.Add(this.tableUser); this.tableUserRole = new UserRoleDataTable(); this.Tables.Add(this.tableUserRole); this.tableRole = new RoleDataTable(); this.Tables.Add(this.tableRole); ForeignKeyConstraint fkc; fkc = new ForeignKeyConstraint("User_UserRole", new DataColumn[] { this.tableUser.loginColumn}, new DataColumn[] { this.tableUserRole.loginColumn}); this.tableUserRole.Constraints.Add(fkc); fkc.AcceptRejectRule = AcceptRejectRule.None; fkc.DeleteRule = Rule.Cascade; fkc.UpdateRule = Rule.Cascade; fkc = new ForeignKeyConstraint("RoleUserRole", new DataColumn[] { this.tableRole.nameColumn}, new DataColumn[] { this.tableUserRole.nameColumn}); this.tableUserRole.Constraints.Add(fkc); fkc.AcceptRejectRule = AcceptRejectRule.Cascade; fkc.DeleteRule = Rule.Cascade; fkc.UpdateRule = Rule.Cascade; this.relationUser_UserRole = new DataRelation("User_UserRole", new DataColumn[] { this.tableUser.loginColumn}, new DataColumn[] { this.tableUserRole.loginColumn}, false); this.relationUser_UserRole.Nested = true; this.Relations.Add(this.relationUser_UserRole); this.relationRoleUserRole = new DataRelation("RoleUserRole", new DataColumn[] { this.tableRole.nameColumn}, new DataColumn[] { this.tableUserRole.nameColumn}, false); this.Relations.Add(this.relationRoleUserRole); }
internal void InitVars() { this.tableUser = ((UserDataTable)(this.Tables["User"])); if ((this.tableUser != null)) { this.tableUser.InitVars(); } this.tableUserRole = ((UserRoleDataTable)(this.Tables["UserRole"])); if ((this.tableUserRole != null)) { this.tableUserRole.InitVars(); } this.tableRole = ((RoleDataTable)(this.Tables["Role"])); if ((this.tableRole != null)) { this.tableRole.InitVars(); } this.relationUser_UserRole = this.Relations["User_UserRole"]; this.relationRoleUserRole = this.Relations["RoleUserRole"]; }