Example #1
0
        public async void GetData()
        {
            List <string> lst1 = null;
            await Task.Run(() => lst1 = BaseDataBase.GetAllStringsWithAll("select distinct NeedType from FamilyNeed"));

            cmboNeedType.ItemsSource = lst1;
        }
Example #2
0
        public StaOrphan()
        {
            InitializeComponent();

            cmboImpeding.ItemsSource = BaseDataBase.GetAllStringsWithAll("select distinct impedingType from impeding");
            cmboHealth.ItemsSource   = BaseDataBase.GetAllStringsWithAll("select Distinct HealthSituation from OrphanHealth");
        }
        public async void GetData()
        {
            await DBMain.UpdateAllPregnant();

            List <string> lst1, lst2, lst3, lst4, lst5, lst6, lst7, lst8;

            lst1 = lst2 = lst3 = lst4 = lst5 = lst6 = lst7 = lst8 = null;
            await Task.Run(() =>
            {
                lst1 = BaseDataBase.GetAllStringsWithAll("select distinct job from (select Job from Parent Union select Job from FamilyPerson) x where ISNULL(Job,'') <> '' order by Job");
                lst2 = BaseDataBase.GetAllStringsWithAll("select distinct HealthStatus from (select HealthStatus from Parent Union select HealthStatus from FamilyPerson) x WHERE ISNULL(HealthStatus,'') <> '' order by HealthStatus");
                lst3 = BaseDataBase.GetAllStringsWithAll("select distinct StudyStatus from (select StudyStatus from Parent Union select StudyStatus from FamilyPerson) x where Isnull(StudyStatus,'') <> '' order by StudyStatus");
                lst4 = BaseDataBase.GetAllStringsWithAll("select distinct HouseSection from House where ISNULL(HouseSection,'') <> '' order by HouseSection");
                lst5 = BaseDataBase.GetAllStringsWithAll("select distinct HouseStreet from House where isnull(HouseStreet,'') <> '' order by HouseStreet");
                lst6 = BaseDataBase.GetAllStringsWithAll("select distinct OldAddress from House x where ISNULL(OldAddress,'') <> '' order by OldAddress");
                lst7 = BaseDataBase.GetAllStringsWithAll("select distinct impededType from (select impededType from Parent Union select impededType from FamilyPerson) x where ISNULL(impededType,'') <> '' order by impededType");
                lst8 = BaseDataBase.GetAllStringsWithAll("select distinct RelationShip from (select 'أب' RelationShip Union select 'أم' Union (select RelationShip from FamilyPerson)) x where ISNULL(RelationShip,'') <> '' order by RelationShip");
            });

            cmboJob.ItemsSource          = lst1;
            cmboHealthStatus.ItemsSource = lst2;
            cmboStudyStatus.ItemsSource  = lst3;
            cmboHouseSection.ItemsSource = lst4;
            cmboHouseStreet.ItemsSource  = lst5;
            cmboOldAddress.ItemsSource   = lst6;
            cmboImpedeType.ItemsSource   = lst7;
            cmboRelationShip.ItemsSource = lst8;
        }
        public FamilyMainControl()
        {
            InitializeComponent();
            bw.WorkerSupportsCancellation = true;
            bw.RunWorkerCompleted        += bw_RunWorkerCompleted;
            bw.DoWork += bw_DoWork;
            cmboSector.ItemsSource = BaseDataBase.GetAllStringsWithAll("select Name from Sector");

            var ilst = Inventory.AllInventories;

            ilst.Insert(0, new Inventory()
            {
                ID = 0, Name = "الكل"
            });
            cmboInventory.ItemsSource = ilst;
        }
Example #5
0
        public async void GetData()
        {
            List <string> lst1 = null, lst2 = null, lst3 = null, lst4 = null;
            await Task.Run(() =>
            {
                lst1 = House.GetHouseSectionsWithAll;
                lst2 = House.GetHouseStreetsWithAll;
                lst3 = House.GetOldAddressesWithAll;
                lst4 = SystemData.GetFamilyTypes;
                lst4.Insert(0, "الكل");
            });

            cmboHouseSection.ItemsSource = lst1;
            cmboHouseStreet.ItemsSource  = lst2;
            cmboOldAddress.ItemsSource   = lst3;
            cmboSector.ItemsSource       = BaseDataBase.GetAllStringsWithAll("Select Name from Sector");
            cmboFamilyType.ItemsSource   = lst4;
        }
Example #6
0
        public async void GetData()
        {
            List <string> lst1 = null, lst2 = null, lst3 = null, lst4 = null, lst5 = null, lst6 = null, lst7 = null;
            await Task.Run(() =>
            {
                lst1 = BaseDataBase.GetAllStringsWithAll("select distinct Name Presenter from [Order] inner join Users on LastUserID = Users.ID");
                lst2 = BaseDataBase.GetAllStringsWithAll("select distinct [Source] from Item");
                lst3 = BaseDataBase.GetAllStringsWithAll("select distinct [ItemType] from Item");
                lst4 = BaseDataBase.GetAllStringsWithAll("select [Name] from Item");
                lst5 = BaseDataBase.GetAllStringsWithAll("select Name from Sector");
                lst4.Add("عائلة خاصة");
                lst6 = BaseDataBase.GetAllStringsWithAll("select Name from Inventory");
                lst7 = House.GetHouseSectionsWithAll;
            });

            cmboPresenter.ItemsSource    = lst1;
            cmboSource.ItemsSource       = lst2;
            cmboSupportType.ItemsSource  = lst3;
            cmboSupportName.ItemsSource  = lst4;
            cmboSector.ItemsSource       = lst5;
            cmboInventory.ItemsSource    = lst6;
            cmboHouseSection.ItemsSource = lst7;
        }