Example #1
0
        public void LoadForm()
        {
            // TODO: This line of code loads data into the 'insuranceDataSet1.VIEW_INSURANCEINFO' table. You can move, or remove it, as needed.
            //this.vIEW_INSURANCEINFOTableAdapter.Fill(this.insuranceDataSet1.VIEW_INSURANCEINFO);

            if (RMX_TOOLS.data.Config.provider.connectionStatus == false)
            {
                MessageBox.Show("اطلاعات بانک اطلاعاتی درست تنظیم نشده");
                new settingForm().ShowDialog();
                this.Close();
            }
            LoginForm lFrm = new LoginForm();

            lFrm.ShowDialog();

            if (!LoginForm.Loggined)
            {
                Application.Exit();
            }
            else
            {
                this.Text = _title + "(" + UsersBS.loginedUser.ToString() + ")";
                // load
                FormsAdjusting.loadGridSetting(_settingFile, dataGridView1);

                fillGrid();
                settingForm.loadPublicSettingToHashTable();

                // CHECK JOB exist
                runAgent();
                // RUN Timer
                String s        = settingForm._ht["cmbScheduleForRefresh"].ToString();
                int    interval = -1;
                try
                {
                    interval = int.Parse(s);
                }
                catch (Exception ex)
                {
                    interval = 10;
                }
                if (interval == -1)
                {
                    interval = 10;
                }

                timer1.Interval = interval * (1000 * 60);
                timer1.Enabled  = true;
            }
            //enable or diable confirm button Button1
            confirmButtonavailability();
        }
Example #2
0
        private void InsuranceInfoSearchForm2_Load(object sender, EventArgs e)
        {
            _userId = int.Parse(UsersBS.loginedUser.Tables[UsersData.users_TABLE].Rows[0][UsersData.id_FIELD] + "");
            fillInsuranceTypeCmboBox();
            fillGrid("");
            // LANGAUGE CHANGEING TO PERSIAN
            InputLanguage persinLanguage = InputLanguage.CurrentInputLanguage;

            for (int i = 0; i < InputLanguage.InstalledInputLanguages.Count; i++)
            {
                if (InputLanguage.InstalledInputLanguages[i].LayoutName.Equals("Farsi"))
                {
                    persinLanguage = InputLanguage.InstalledInputLanguages[i];
                }
            }
            InputLanguage.CurrentInputLanguage = persinLanguage;
            //
            FormsAdjusting.loadGridSetting(_settingFileName, dataGridView1);
        }