Ejemplo n.º 1
0
        private void btnRestore_Click(object sender, EventArgs e)
        {
            try
            {
                if (!ObjUtil.IsControlTextEmpty(txtDabasePath))
                {
                    ThrRestore = new Thread(new ThreadStart(RestoreDataBase));
                    ThrRestore.SetApartmentState(ApartmentState.MTA);
                    ThrRestore.Start();
                    ObjLoading.label1.Text = "Restoring Please Wait...";
                    ObjLoading.BringToFront();
                    ObjLoading.ShowDialog();

                    frmCustomerRegister reg = new RegistrationProcess.frmCustomerRegister();
                    //reg.exeName = System.Diagnostics.Process.GetCurrentProcess().ProcessName;
                    this.Close();
                    reg.BringToFront();
                    reg.Show();
                }
                else
                {
                    clsUtility.ShowInfoMessage("Select DataBase to Restore..");
                }
            }
            catch (Exception ex)
            {
                clsUtility.ShowErrorMessage(ex.Message);
            }
        }
Ejemplo n.º 2
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (timer1.Interval == 4000)
            {
                try
                {
                    if (!IsPath)
                    {
                        timer1.Stop();
                        RegistrationProcess.frmServerConnect Obj = new RegistrationProcess.frmServerConnect();
                        Obj.ClientDBName = "IMS_Client_2";
                        //Obj.exeName = System.Diagnostics.Process.GetCurrentProcess().ProcessName;
                        this.Hide();
                        Obj.BringToFront();
                        Obj.Show();
                    }
                    else if (CheckReg())
                    {
                        timer1.Stop();

                        frmLogin Obj = new frmLogin();
                        this.Hide();
                        Obj.BringToFront();
                        Obj.Show();
                        //login window
                    }
                    else
                    {
                        timer1.Stop();
                        if (i == 0)
                        {
                            RegistrationProcess.frmCustomerRegister reg = new RegistrationProcess.frmCustomerRegister();
                            //reg.exeName = System.Diagnostics.Process.GetCurrentProcess().ProcessName;
                            this.Hide();
                            reg.BringToFront();
                            reg.Show();
                        }
                    }
                }
                catch
                {
                    timer1.Enabled = false;
                    timer1.Stop();
                    this.Close();
                }
            }
        }
Ejemplo n.º 3
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (timer1.Interval == 4000)
            {
                try
                {
                    if (!IsPath)
                    {
                        timer1.Stop();
                        RegistrationProcess.frmServerConnect Obj = new RegistrationProcess.frmServerConnect();
                        Obj.ClientDBName = "IMS";
                        this.Hide();
                        Obj.BringToFront();
                        Obj.Show();
                    }
                    else if (CheckReg())
                    {
                        timer1.Stop();

                        //Login Obj = new Login()
                        MessageBox.Show("Welcome Login");
                        //login window
                    }
                    else
                    {
                        timer1.Stop();
                        if (i == 0)
                        {
                            RegistrationProcess.frmCustomerRegister reg = new RegistrationProcess.frmCustomerRegister();
                            this.Hide();
                            reg.BringToFront();
                            reg.Show();
                        }
                    }
                }
                catch
                {
                    timer1.Enabled = false;
                    timer1.Stop();
                    this.Close();
                }
            }
        }