Example #1
0
        public static void AddColumn(string tableName, Column column)
        {
            var udt = new UserDataTable(tableName);

            udt.Columns.Add(column);
            udt.Save();
        }
Example #2
0
 /// <summary>
 /// Default Constructor
 /// </summary>
 public UserDao()
 {
     _userAdapter = new UserTableAdapter();
     _userTable   = new UserDataTable();
     _userAdapter.Fill(_userTable);
     _rng = new Random();
 }
Example #3
0
        public UserDataTable GetUsers(string param, int page, int pageSize)
        {
            param = param ?? "";            //param = null gán bằng ""

            var users = _userRepository.GetAllQueryable()
                        .Where(u => u.FullName.ToLower().Contains(param.ToLower()) || u.UserName.ToLower().Contains(param.ToLower()))
                        .OrderBy(u => u.UserName.ToLower())
                        .Skip((page - 1) * pageSize).Take(pageSize).ToList();

            var totalUsers = _userRepository.GetAllQueryable()
                             .Where(u => u.FullName.ToLower().Contains(param.ToLower()) || u.UserName.ToLower().Contains(param.ToLower())).Count();
            //Map từ Model qua ViewModel
            var userRowViewModels = _mapper.Map <List <User>, List <UserRowViewModel> >(users);

            //Get Role for users
            foreach (var userRow in userRowViewModels)
            {
                var userRole = _userRoleRepository.Get(x => x.UserId == userRow.Id);
                if (userRole != null)
                {
                    userRow.RoleId = userRole.RoleId;
                }
            }

            var userDataTable = new UserDataTable()
            {
                Data  = userRowViewModels,
                Total = totalUsers
            };

            return(userDataTable);
        }
            public override global::System.Data.DataTable Clone()
            {
                UserDataTable cln = ((UserDataTable)(base.Clone()));

                cln.InitVars();
                return(cln);
            }
            public void Read(FileReader reader)
            {
                reader.ByteOrder = Syroot.BinaryData.ByteOrder.LittleEndian;
                reader.ReadSignature(4, "XLNK");
                uint FileSize                         = reader.ReadUInt32();
                uint Version                          = reader.ReadUInt32();
                uint numResParam                      = reader.ReadUInt32();
                uint numResAssetParam                 = reader.ReadUInt32();
                uint numResTriggerOverwriteParam      = reader.ReadUInt32();
                uint triggerOverwriteParamTablePos    = reader.ReadUInt32();
                uint localPropertyNameRefTablePos     = reader.ReadUInt32();
                uint numLocalPropertyNameRefTable     = reader.ReadUInt32();
                uint numLocalPropertyEnumNameRefTable = reader.ReadUInt32();
                uint numDirectValueTable              = reader.ReadUInt32();
                uint numRandomTable                   = reader.ReadUInt32();
                uint numCurveTable                    = reader.ReadUInt32();
                uint numCurvePointTable               = reader.ReadUInt32();
                uint exRegionPos                      = reader.ReadUInt32();
                uint numUser                          = reader.ReadUInt32();
                uint conditionTablePos                = reader.ReadUInt32();
                uint nameTablePos                     = reader.ReadUInt32();

                UserDataTable = new UserDataTable();
                UserDataTable.Read(reader, (int)numUser);

                ParamDefineTable = new ParamDefineTable();
                ParamDefineTable.Read(reader);
            }
Example #6
0
            public override DataTable Clone()
            {
                UserDataTable cln = ((UserDataTable)(base.Clone()));

                cln.InitVars();
                return(cln);
            }
Example #7
0
            public void Read(FileReader reader)
            {
                reader.ByteOrder = Syroot.BinaryData.ByteOrder.LittleEndian;
                reader.ReadSignature(4, "XLNK");
                uint FileSize                         = reader.ReadUInt32();
                uint Version                          = reader.ReadUInt32();
                uint numResParam                      = reader.ReadUInt32();
                uint numResAssetParam                 = reader.ReadUInt32();
                uint numResTriggerOverwriteParam      = reader.ReadUInt32();
                uint triggerOverwriteParamTablePos    = reader.ReadUInt32();
                uint localPropertyNameRefTablePos     = reader.ReadUInt32();
                uint numLocalPropertyNameRefTable     = reader.ReadUInt32();
                uint numLocalPropertyEnumNameRefTable = reader.ReadUInt32();
                uint numDirectValueTable              = reader.ReadUInt32();
                uint numRandomTable                   = reader.ReadUInt32();
                uint numCurveTable                    = reader.ReadUInt32();
                uint numCurvePointTable               = reader.ReadUInt32();
                uint exRegionPos                      = reader.ReadUInt32();
                uint numUser                          = reader.ReadUInt32();
                uint conditionTablePos                = reader.ReadUInt32();

                nameTablePos = reader.ReadUInt32();

                UserDataTable = new UserDataTable();
                UserDataTable.Read(reader, (int)numUser);

                ParamDefineTable = new ParamDefineTable();
                ParamDefineTable.Read(reader, this);

                for (int i = 0; i < numResAssetParam; i++)
                {
                    var resAssetsParam = new ResourceAssetParamTable();
                    resAssetsParam.Read(reader);
                    ResourceAssetParamTables.Add(resAssetsParam);
                }

                reader.SeekBegin(triggerOverwriteParamTablePos);
                for (int i = 0; i < numResTriggerOverwriteParam; i++)
                {
                    var triggerOverwriteParamTbl = new TriggerOverwriteParamTable();
                    triggerOverwriteParamTbl.Read(reader);
                    TriggerOverwriteParamTables.Add(triggerOverwriteParamTbl);
                }

                reader.SeekBegin(localPropertyNameRefTablePos);
                for (int i = 0; i < numLocalPropertyNameRefTable; i++)
                {
                    var localNameProp = new LocalNameProperty();
                    localNameProp.Read(reader, nameTablePos);
                    LocalNameProperties.Add(localNameProp);
                }

                for (int i = 0; i < numLocalPropertyEnumNameRefTable; i++)
                {
                    var localNameProp = new LocalNameProperty();
                    localNameProp.Read(reader, nameTablePos);
                    LocalNameEnumProperties.Add(localNameProp);
                }
            }
Example #8
0
        public Task <UserObjectModel> GetUser()
        {
            UserDataTable tableObj = new UserDataTable();
            var           result   = DataTableToList <UserObjectModel>(tableObj.GetAllUsers()).FirstOrDefault();

            tableObj.Dispose();
            return(Task.FromResult(result));
        }
Example #9
0
 internal void InitVars()
 {
     this.tableUser = ((UserDataTable)(this.Tables["User"]));
     if ((this.tableUser != null))
     {
         this.tableUser.InitVars();
     }
 }
 private void InitClass()
 {
     this.DataSetName             = "DataSetMIKA";
     this.Prefix                  = "";
     this.Namespace               = "http://tempuri.org/DataSetMIKA.xsd";
     this.EnforceConstraints      = true;
     this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
     this.tableUser               = new UserDataTable();
     base.Tables.Add(this.tableUser);
 }
Example #11
0
 static TableLocator()
 {
     furnitureTable  = new FurnitureTable("Table/Furniture");
     buffTable       = new BuffTable("Table/Buff");
     userDataTable   = new UserDataTable("Table/UserData");
     carTable        = new CarTable("Table/CarData");
     probsTable      = new ProbsTable("Table/Probs");
     mapDataTable    = new MapDataTable("Table/MapList");
     animalDataTable = new AnimalDataTable("Table/AnimalData");
 }
 internal void InitVars(bool initTable)
 {
     this.tableUser = ((UserDataTable)(base.Tables["User"]));
     if ((initTable == true))
     {
         if ((this.tableUser != null))
         {
             this.tableUser.InitVars();
         }
     }
 }
 private void InitClass()
 {
     this.DataSetName             = "DataSetUser";
     this.Prefix                  = "";
     this.Namespace               = "http://www.tempuri.org/DataSetUser.xsd";
     this.Locale                  = new global::System.Globalization.CultureInfo("zh-CN");
     this.EnforceConstraints      = true;
     this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
     this.tableUser               = new UserDataTable();
     base.Tables.Add(this.tableUser);
 }
Example #14
0
 private void InitClass()
 {
     this.DataSetName        = "ContactsData";
     this.Prefix             = "";
     this.Namespace          = "http://www.tempuri.org/ContactsData.xsd";
     this.Locale             = new System.Globalization.CultureInfo("en-US");
     this.CaseSensitive      = false;
     this.EnforceConstraints = true;
     this.tableUser          = new UserDataTable();
     this.Tables.Add(this.tableUser);
 }
Example #15
0
    private void InitClass()
    {
        this.DataSetName        = "ArtooBase";
        this.Prefix             = "";
        this.Namespace          = "";
        this.Locale             = new System.Globalization.CultureInfo("en-US");
        this.CaseSensitive      = false;
        this.EnforceConstraints = true;
        this.tableUser          = new UserDataTable();
        this.Tables.Add(this.tableUser);
        this.tableStatus = new StatusDataTable();
        this.Tables.Add(this.tableStatus);
        this.tableBuddy = new BuddyDataTable();
        this.Tables.Add(this.tableBuddy);
        ForeignKeyConstraint fkc;

        fkc = new ForeignKeyConstraint("User_Status", new DataColumn[] {
            this.tableUser.User_IdColumn
        }, new DataColumn[] {
            this.tableStatus.User_IdColumn
        });
        this.tableStatus.Constraints.Add(fkc);
        fkc.AcceptRejectRule = System.Data.AcceptRejectRule.None;
        fkc.DeleteRule       = System.Data.Rule.Cascade;
        fkc.UpdateRule       = System.Data.Rule.Cascade;
        fkc = new ForeignKeyConstraint("User_Buddy", new DataColumn[] {
            this.tableUser.User_IdColumn
        }, new DataColumn[] {
            this.tableBuddy.User_IdColumn
        });
        this.tableBuddy.Constraints.Add(fkc);
        fkc.AcceptRejectRule     = System.Data.AcceptRejectRule.None;
        fkc.DeleteRule           = System.Data.Rule.Cascade;
        fkc.UpdateRule           = System.Data.Rule.Cascade;
        this.relationUser_Status = new DataRelation("User_Status", new DataColumn[] {
            this.tableUser.User_IdColumn
        }, new DataColumn[] {
            this.tableStatus.User_IdColumn
        }, false);
        this.relationUser_Status.Nested = true;
        this.Relations.Add(this.relationUser_Status);
        this.relationUser_Buddy = new DataRelation("User_Buddy", new DataColumn[] {
            this.tableUser.User_IdColumn
        }, new DataColumn[] {
            this.tableBuddy.User_IdColumn
        }, false);
        this.relationUser_Buddy.Nested = true;
        this.Relations.Add(this.relationUser_Buddy);
    }
Example #16
0
        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);
        }
Example #17
0
 internal void InitVars()
 {
     this.tableUser = ((UserDataTable)(this.Tables["User"]));
     if ((this.tableUser != null))
     {
         this.tableUser.InitVars();
     }
     this.tableStatus = ((StatusDataTable)(this.Tables["Status"]));
     if ((this.tableStatus != null))
     {
         this.tableStatus.InitVars();
     }
     this.tableBuddy = ((BuddyDataTable)(this.Tables["Buddy"]));
     if ((this.tableBuddy != null))
     {
         this.tableBuddy.InitVars();
     }
     this.relationUser_Status = this.Relations["User_Status"];
     this.relationUser_Buddy  = this.Relations["User_Buddy"];
 }
Example #18
0
 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 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"];
 }
Example #20
0
 internal UserRow(global::System.Data.DataRowBuilder rb)
     : base(rb)
 {
     this.tableUser = ((UserDataTable)(this.Table));
 }
Example #21
0
        public void UserListSearchByOrqan(string groupName, string organ, ObservableCollection <OC_OutputportInfo> doorList, SqlConnection connection)
        {
            try
            {
                //string query = "Select Eventtime, DoorName, AccessUserCard_SID, USERNAME, MemberID, Organization " +
                //            "from ADTSC.CM_AccessEventLog " +
                //            "where Door_DID = @DID" +
                //            " AND " +
                //            "Organization = @OrganizationName" +
                //            " AND " +
                //            "EventTime BETWEEN @STARTDATE AND @ENDDATE";

                string query = "Select EventTime, Organization, USERNAME, MemberID, DoorName, AccessUserCard_SID " +
                               "from ADTSC.CM_AccessEventLog " +
                               "where Door_DID = @DID" +
                               " AND " +
                               "Organization = @OrganizationName" +
                               " AND " +
                               "EventTime=(Select MAX(EventTime) From ADTSC.CM_AccessEventLog where EventTime BETWEEN @STARTDATE AND @ENDDATE)";

                //    string query = "Select EventTime, DoorName, AccessUserCard_SID, USERNAME, MemberID, Organization " +
                //"from ADTSC.CM_AccessEventLog " +
                //"where EventTime=" +
                //"(Select MAX(EventTime) From ADTSC.CM_AccessEventLog where EventTime BETWEEN @STARTDATE" +
                //" AND @ENDDATE AND Door_DID = @DID " +
                //"AND Organization = @OrganizationName)";



                SqlCommand cmd = new SqlCommand(query, connection);
                cmd.Parameters.Add("@DID", SqlDbType.NVarChar);
                cmd.Parameters.Add("@STARTDATE", SqlDbType.DateTime);
                cmd.Parameters.Add("@ENDDATE", SqlDbType.DateTime);
                cmd.Parameters.Add("@OrganizationName", SqlDbType.NVarChar);

                SqlDataReader reader;
                var           state = connection.State.ToString();
                if (state.Equals("Closed"))
                {
                    connection.Open();
                    foreach (var a in doorList)
                    {
                        cmd.Parameters["@DID"].Value              = a.DID;
                        cmd.Parameters["@STARTDATE"].Value        = StartDate;
                        cmd.Parameters["@ENDDATE"].Value          = EndDate;
                        cmd.Parameters["@OrganizationName"].Value = organ;
                        reader = cmd.ExecuteReader();

                        if (reader.HasRows)
                        {
                            if (UserDataTable.Columns.Contains("GroupName"))
                            {
                                UserDataTable.Columns["GroupName"].DefaultValue = groupName;
                            }
                            else if (!UserDataTable.Columns.Contains("GroupName"))
                            {
                                UserDataTable.Columns.Add("GroupName", typeof(string));
                                UserDataTable.Columns["GroupName"].DefaultValue = groupName;
                            }

                            UserDataTable.Load(reader);

                            var dicTuple = new Tuple <string, string>(groupName, organ);
                            GroupDic.Add(dicTuple, UserDataTable);
                            reader.Close();
                        }
                        else
                        {
                            reader.Close();
                        }
                    }
                    connection.Close();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Example #22
0
 internal UserRow(DataRowBuilder rb) :
     base(rb)
 {
     this.tableUser = ((UserDataTable)(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 UserRow(DataRowBuilder rb)
     : base(rb)
 {
     this.tableUser = ((UserDataTable)(this.Table));
 }
 internal UserRow(global::System.Data.DataRowBuilder rb) :
     base(rb)
 {
     this.tableUser = ((UserDataTable)(this.Table));
 }
Example #26
0
 private void InitClass() {
     this.DataSetName = "UserDataSet";
     this.Prefix = "";
     this.Namespace = "http://thesofttribe.com/platform/sledger/UserDataSet.xsd";
     this.EnforceConstraints = true;
     this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
     this.tableUser = new UserDataTable();
     base.Tables.Add(this.tableUser);
 }
Example #27
0
 private void InitClass()
 {
     this.DataSetName = "Users";
     this.Prefix = "";
     this.EnforceConstraints = true;
     this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
     this.tableUser = new UserDataTable();
     base.Tables.Add(this.tableUser);
 }
 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);
 }
Example #29
0
 private void InitClass() {
     this.DataSetName = "VCFDataSet";
     this.Prefix = "";
     this.Namespace = "http://tempuri.org/VCFDataSet.xsd";
     this.EnforceConstraints = true;
     this.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
     this.tableCity = new CityDataTable();
     base.Tables.Add(this.tableCity);
     this.tableDonation = new DonationDataTable();
     base.Tables.Add(this.tableDonation);
     this.tableUser = new UserDataTable();
     base.Tables.Add(this.tableUser);
     this.tableProject = new ProjectDataTable();
     base.Tables.Add(this.tableProject);
     this.tableDistribution = new DistributionDataTable();
     base.Tables.Add(this.tableDistribution);
     this.tableV_Distribution_Project = new V_Distribution_ProjectDataTable();
     base.Tables.Add(this.tableV_Distribution_Project);
     this.tableV_User_Distribution_Project = new V_User_Distribution_ProjectDataTable();
     base.Tables.Add(this.tableV_User_Distribution_Project);
     this.tableV_FormatedUser = new V_FormatedUserDataTable();
     base.Tables.Add(this.tableV_FormatedUser);
     this.tableUserRelationShip = new UserRelationShipDataTable();
     base.Tables.Add(this.tableUserRelationShip);
     this.tableV_ProjectNameAndID = new V_ProjectNameAndIDDataTable();
     base.Tables.Add(this.tableV_ProjectNameAndID);
     this.relationFK_User_User = new System.Data.DataRelation("FK_User_User", new System.Data.DataColumn[] {
                 this.tableUser.UserIDColumn}, new System.Data.DataColumn[] {
                 this.tableUser.FatherUserIDColumn}, false);
     this.Relations.Add(this.relationFK_User_User);
     this.relationFK_Donation_User = new System.Data.DataRelation("FK_Donation_User", new System.Data.DataColumn[] {
                 this.tableUser.UserIDColumn}, new System.Data.DataColumn[] {
                 this.tableDonation.DonationUserIDColumn}, false);
     this.Relations.Add(this.relationFK_Donation_User);
     this.relationFK_Donation_Project = new System.Data.DataRelation("FK_Donation_Project", new System.Data.DataColumn[] {
                 this.tableProject.ProjectIDColumn}, new System.Data.DataColumn[] {
                 this.tableDonation.ProjectIDColumn}, false);
     this.Relations.Add(this.relationFK_Donation_Project);
     this.relationFK_Project_Project = new System.Data.DataRelation("FK_Project_Project", new System.Data.DataColumn[] {
                 this.tableUser.UserIDColumn}, new System.Data.DataColumn[] {
                 this.tableProject.ManagerIDColumn}, false);
     this.Relations.Add(this.relationFK_Project_Project);
     this.relationFK_Distribution_Project = new System.Data.DataRelation("FK_Distribution_Project", new System.Data.DataColumn[] {
                 this.tableProject.ProjectIDColumn}, new System.Data.DataColumn[] {
                 this.tableDistribution.ProjectIDColumn}, false);
     this.Relations.Add(this.relationFK_Distribution_Project);
     this.relationFK_Distribution_User = new System.Data.DataRelation("FK_Distribution_User", new System.Data.DataColumn[] {
                 this.tableUser.UserIDColumn}, new System.Data.DataColumn[] {
                 this.tableDistribution.FromUserIDColumn}, false);
     this.Relations.Add(this.relationFK_Distribution_User);
     this.relationFK_Distribution_User1 = new System.Data.DataRelation("FK_Distribution_User1", new System.Data.DataColumn[] {
                 this.tableUser.UserIDColumn}, new System.Data.DataColumn[] {
                 this.tableDistribution.ToUserIDColumn}, false);
     this.Relations.Add(this.relationFK_Distribution_User1);
     this.relationFK_UserRelationShip_Project = new System.Data.DataRelation("FK_UserRelationShip_Project", new System.Data.DataColumn[] {
                 this.tableProject.ProjectIDColumn}, new System.Data.DataColumn[] {
                 this.tableUserRelationShip.ProjectIDColumn}, false);
     this.Relations.Add(this.relationFK_UserRelationShip_Project);
     this.relationFK_UserRelationShip_User = new System.Data.DataRelation("FK_UserRelationShip_User", new System.Data.DataColumn[] {
                 this.tableUser.UserIDColumn}, new System.Data.DataColumn[] {
                 this.tableUserRelationShip.SuperiorUserIDColumn}, false);
     this.Relations.Add(this.relationFK_UserRelationShip_User);
     this.relationFK_UserRelationShip_User1 = new System.Data.DataRelation("FK_UserRelationShip_User1", new System.Data.DataColumn[] {
                 this.tableUser.UserIDColumn}, new System.Data.DataColumn[] {
                 this.tableUserRelationShip.InferiorUserIDColumn}, false);
     this.Relations.Add(this.relationFK_UserRelationShip_User1);
 }
Example #30
0
 internal void InitVars(bool initTable)
 {
     this.tableUser = ((UserDataTable)(base.Tables["User"]));
     if ((initTable == true)) {
         if ((this.tableUser != null)) {
             this.tableUser.InitVars();
         }
     }
 }
Example #31
0
 internal void InitVars(bool initTable) {
     this.tableCity = ((CityDataTable)(base.Tables["City"]));
     if ((initTable == true)) {
         if ((this.tableCity != null)) {
             this.tableCity.InitVars();
         }
     }
     this.tableDonation = ((DonationDataTable)(base.Tables["Donation"]));
     if ((initTable == true)) {
         if ((this.tableDonation != null)) {
             this.tableDonation.InitVars();
         }
     }
     this.tableUser = ((UserDataTable)(base.Tables["User"]));
     if ((initTable == true)) {
         if ((this.tableUser != null)) {
             this.tableUser.InitVars();
         }
     }
     this.tableProject = ((ProjectDataTable)(base.Tables["Project"]));
     if ((initTable == true)) {
         if ((this.tableProject != null)) {
             this.tableProject.InitVars();
         }
     }
     this.tableDistribution = ((DistributionDataTable)(base.Tables["Distribution"]));
     if ((initTable == true)) {
         if ((this.tableDistribution != null)) {
             this.tableDistribution.InitVars();
         }
     }
     this.tableV_Distribution_Project = ((V_Distribution_ProjectDataTable)(base.Tables["V_Distribution_Project"]));
     if ((initTable == true)) {
         if ((this.tableV_Distribution_Project != null)) {
             this.tableV_Distribution_Project.InitVars();
         }
     }
     this.tableV_User_Distribution_Project = ((V_User_Distribution_ProjectDataTable)(base.Tables["V_User_Distribution_Project"]));
     if ((initTable == true)) {
         if ((this.tableV_User_Distribution_Project != null)) {
             this.tableV_User_Distribution_Project.InitVars();
         }
     }
     this.tableV_FormatedUser = ((V_FormatedUserDataTable)(base.Tables["V_FormatedUser"]));
     if ((initTable == true)) {
         if ((this.tableV_FormatedUser != null)) {
             this.tableV_FormatedUser.InitVars();
         }
     }
     this.tableUserRelationShip = ((UserRelationShipDataTable)(base.Tables["UserRelationShip"]));
     if ((initTable == true)) {
         if ((this.tableUserRelationShip != null)) {
             this.tableUserRelationShip.InitVars();
         }
     }
     this.tableV_ProjectNameAndID = ((V_ProjectNameAndIDDataTable)(base.Tables["V_ProjectNameAndID"]));
     if ((initTable == true)) {
         if ((this.tableV_ProjectNameAndID != null)) {
             this.tableV_ProjectNameAndID.InitVars();
         }
     }
     this.relationFK_User_User = this.Relations["FK_User_User"];
     this.relationFK_Donation_User = this.Relations["FK_Donation_User"];
     this.relationFK_Donation_Project = this.Relations["FK_Donation_Project"];
     this.relationFK_Project_Project = this.Relations["FK_Project_Project"];
     this.relationFK_Distribution_Project = this.Relations["FK_Distribution_Project"];
     this.relationFK_Distribution_User = this.Relations["FK_Distribution_User"];
     this.relationFK_Distribution_User1 = this.Relations["FK_Distribution_User1"];
     this.relationFK_UserRelationShip_Project = this.Relations["FK_UserRelationShip_Project"];
     this.relationFK_UserRelationShip_User = this.Relations["FK_UserRelationShip_User"];
     this.relationFK_UserRelationShip_User1 = this.Relations["FK_UserRelationShip_User1"];
 }
 internal void InitVars(bool initTable) {
     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();
         }
     }
     this.tableRole = ((RoleDataTable)(base.Tables["Role"]));
     if ((initTable == true)) {
         if ((this.tableRole != null)) {
             this.tableRole.InitVars();
         }
     }
     this.relationUser_UserRole = this.Relations["User_UserRole"];
     this.relationRoleUserRole = this.Relations["RoleUserRole"];
 }