Esempio n. 1
0
        public static void SystemInitializer()
        {
            if (is_init)
            {
                return;
            }
            try
            {
                is_init = true;
                if (CURR_FS == null)
                {
                    CURR_DATE = fn.GetServerDate();
                    CURR_FS   = fn.GetFsDetails(CURR_DATE, false);
                }
                if (CURR_FS != null)
                {
                    fill_data_fs(CURR_FS.fs_year);
                }
                if (DATA_SABBATH_RECEIPT == null)
                {
                    DATA_SABBATH_RECEIPT = new SortedList <int, List <MTOMS.ic.off_receipt> >();
                }
                DATA_STAMP_STORE = new SortedList <em.StampTables, long>();
                GetLastSabbath();
                FillPcUserDetails();


                xing xd = new xing();
                datam.FillChurchSubUnits(xd);
                datam.MemberInit(ref xd);
                fill_church_group_types(xd);
                fill_church_groups(xd);
                datam.InitDesignation(xd);
                datam.MemberStatusInit(ref xd);
                datam.InitAccount(xd);
                datam.InitExpenses(xd);
                datam.DepartmentInit(ref xd);
                datam.GetSystemDefaultValues(xd);
                xd.CommitTransaction();
                xd.Dispose();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                System.Environment.Exit(0);
            }
        }