コード例 #1
0
        private void userBtn_Click(object sender, EventArgs e)
        {
            //Users user = new Users();
            Users t = new Users();

            MainClass.showWindow(t, this, MDI.ActiveForm);
        }
コード例 #2
0
        private void logoutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MDI.logoutToolStripMenuItem.Enabled = false;
            login set = new login();

            MainClass.showWindow(set, this);
        }
コード例 #3
0
 private void loginBtn_Click(object sender, EventArgs e)
 {
     if (usernameTxt.Text == "")
     {
         unameErrorLabel.Visible = true;
     }
     else
     {
         unameErrorLabel.Visible = false;
     }
     if (passTxt.Text == "")
     {
         passErrorLabel.Visible = true;
     }
     else
     {
         passErrorLabel.Visible = false;
     }
     if (unameErrorLabel.Visible || passErrorLabel.Visible)
     {
         MainClass.showMessage("Fields with * are mandatory", "Stop", "Error");
     }
     else
     {
         if (Retrieval.getUserDetail(usernameTxt.Text, passTxt.Text))
         {
             HomeScreen obj = new HomeScreen();
             MainClass.showWindow(obj, this, MDI.ActiveForm);
         }
         else
         {
         }
     }
 }
コード例 #4
0
        private void MDI_Load(object sender, EventArgs e)
        {
            string path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);

            if (File.Exists(path + "\\connect"))
            {
                login log = new login();
                MainClass.showWindow(log, this);
            }
            else
            {
                settings set = new settings();
                MainClass.showWindow(set, this);
            }
        }
コード例 #5
0
        private void saveBtn_Click(object sender, EventArgs e)
        {
            string s;
            string path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);

            if (isCB.Checked)
            {
                if (serverTxt.Text != "" && databaseTxt.Text != "")
                {
                    s = "datasource=" + serverTxt.Text + ";Initial Catalog=" + databaseTxt.Text + ";Integrated Security=true;MultipleActiveResultSets=true;";
                    File.WriteAllText(path + "\\connect", s);

                    DialogResult dr = MessageBox.Show("Setting successfully saved....", "information...", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    if (dr == DialogResult.OK)
                    {
                        login log = new login();
                        MainClass.showWindow(log, this, MDI.ActiveForm);
                    }
                }
                else
                {
                    MessageBox.Show("Please fill complete Data to continue.");
                }
            }
            else
            {
                if (serverTxt.Text != "" && databaseTxt.Text != "" && userTxt.Text != "" && passTxt.Text != "")
                {
                    s = "datasource=" + serverTxt.Text + ";Initial Catalog=" + databaseTxt.Text + ";User ID=" + userTxt.Text + ";Password="******";MultipleActiveResultSets=true;";
                    File.WriteAllText(path + "\\connect", s);

                    DialogResult dr = MessageBox.Show("Setting successfully saved....", "information...", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    if (dr == DialogResult.OK)
                    {
                        login log = new login();
                        MainClass.showWindow(log, this, MDI.ActiveForm);
                    }
                }
                else
                {
                    MessageBox.Show("Please fill complete Data to continue.");
                }
            }
        }
コード例 #6
0
        private void saveBtn_Click(object sender, EventArgs e)
        {
            string s;
            string path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);

            if (checkBox1.Checked)
            {
                if (serverTxt.Text != "" && dbTxt.Text != "")
                {
                    s = "Data Source=" + serverTxt.Text + ";Initial Catalog=" + dbTxt.Text + ";Integrated Security=true;";
                    File.WriteAllText(path + "\\connect", s);
                    DialogResult dr = MessageBox.Show("Saved Successfully....", "Information....", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    if (dr == DialogResult.OK)
                    {
                        login log = new login();
                        MainClass.showWindow(log, this, MDI.ActiveForm);
                    }
                }
                else
                {
                    MessageBox.Show("Please fill above fields");
                }
            }
            else
            {
                if (serverTxt.Text != "" && dbTxt.Text != "" && userTxt.Text != "" && passTxt.Text != "")
                {
                    s = "Data Source=" + serverTxt.Text + ";Initial Catalog=" + dbTxt.Text + ";User ID=" + userTxt.Text + ";Password="******";";
                    File.WriteAllText(path + "\\connect", s);
                    DialogResult dr = MessageBox.Show("Saved Successfully....", "Information....", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    if (dr == DialogResult.OK)
                    {
                        login log = new login();
                        MainClass.showWindow(log, this, MDI.ActiveForm);
                    }
                }
                else
                {
                    MessageBox.Show("Please fill above fields");
                }
            }
        }
コード例 #7
0
ファイル: MDI.cs プロジェクト: ArshMohiuddin/IMS
 private void MDI_Load(object sender, EventArgs e)
 {
     try
     {
         if (File.Exists(path + "\\connect"))
         {
             Login log = new Login();
             MainClass.showWindow(log, this);
         }
         else
         {
             Settings set = new Settings();
             MainClass.showWindow(set, this);
         }
     }
     catch (Exception ex)
     {
         MainClass.showMSG(ex.Message, "Error", "Error");
     }
 }
コード例 #8
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (isCB.Checked)
            {
                if (ServerTxt.Text != string.Empty && databaseTxt.Text != string.Empty)
                {
                    s = "Data Source=" + ServerTxt.Text + "; Initial Catalog=" + databaseTxt.Text + "; Integrated Security=true;";
                    File.WriteAllText(path + "\\connect", s);

                    DialogResult dr = MessageBox.Show("Settings Saved Successfully...", "information...", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    if (dr == DialogResult.OK)
                    {
                        Login log = new Login();
                        MainClass.showWindow(log, this, MDI.ActiveForm);
                    }
                }
                else
                {
                    MessageBox.Show("Please give complete data to countinue...");
                }
            }
            else
            {
                if (ServerTxt.Text != string.Empty && databaseTxt.Text != string.Empty && UserIdTxt.Text != string.Empty && passTxt.Text != string.Empty)
                {
                    s = "Data Source=" + ServerTxt.Text + "; Initial Catalog=" + databaseTxt.Text + "; User ID=" + UserIdTxt.Text + "; Password="******";";
                    File.WriteAllText(path + "\\connect", s);
                    DialogResult dr = MessageBox.Show("Settings Saved Successfully...", "information...", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    if (dr == DialogResult.OK)
                    {
                        Login log = new Login();
                        MainClass.showWindow(log, this, MDI.ActiveForm);
                    }
                }
                else
                {
                    MessageBox.Show("Please give complete data to countinue...");
                }
            }
        }
コード例 #9
0
        private void saveBTN_Click(object sender, EventArgs e)
        {
            string s;
            string path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);

            if (isCB.Checked)
            {
                if (serverTXT.Text != "" && databaseTXT.Text != "")
                {
                    s = "Data Source=" + serverTXT.Text + ";Initial Catalog=" + databaseTXT.Text + ";Integrated Security=true;";
                    File.WriteAllText(path + "\\connect", s);
                    DialogResult dr = MessageBox.Show("Settings Successfully Saved !!!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    if (dr == DialogResult.OK)
                    {
                        login log = new login();
                        MainClass.showWindow(log, this, MDi.ActiveForm);
                    }
                }

                else
                {
                    MessageBox.Show("Please give complete data for continue");
                }
            }
            else
            {
                if (serverTXT.Text != "" && databaseTXT.Text != "" && userTXT.Text != "" && passTXT.Text != "")
                {
                    s = "Data Source=" + serverTXT.Text + ";Initial Catalog=" + databaseTXT.Text + ";User Id=" + userTXT.Text + ";Password="******";";
                    File.WriteAllText(path + "\\connect", s);
                }
                else
                {
                    MessageBox.Show("Please give complete data for continue");
                }
            }
        }
コード例 #10
0
ファイル: Login.cs プロジェクト: ArshMohiuddin/IMS
 private void btnLogin_Click(object sender, EventArgs e)
 {
     if (usernameTxt.Text.Trim() == string.Empty)
     {
         nameErrorLabel.Visible = true;
     }
     else
     {
         nameErrorLabel.Visible = false;
     }
     if (passtxt.Text.Trim() == string.Empty)
     {
         PassErrorLabel.Visible = true;
     }
     else
     {
         PassErrorLabel.Visible = false;
     }
     if (nameErrorLabel.Visible || PassErrorLabel.Visible)
     {
         MainClass.showMSG("Fields with * are mandatory", "Stop", "Error"); //Error is the type of message
     }
     else
     {
         if (usernameTxt.Text != "" && passtxt.Text != "")
         {
             if (retrieval.getUserDetails(usernameTxt.Text, passtxt.Text))
             {
                 HomeScreen hs = new HomeScreen();
                 MainClass.showWindow(hs, this, MDI.ActiveForm);
             }
             else
             {
             }
         }
     }
 }
コード例 #11
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (usernameTXt.Text == "")
            {
                nameErrorLabel.Visible = true;
            }
            else
            {
                nameErrorLabel.Visible = false;
            }

            if (passTxt.Text == "")
            {
                passErrorLabel.Visible = true;
            }
            else
            {
                passErrorLabel.Visible = false;
            }

            if (nameErrorLabel.Visible || passErrorLabel.Visible)
            {
                MainClass.ShowMSG("Fields with * are mandatory", "Stop", "Error");                //Error is the type of message.
            }
            else
            {
                if (retrieval.getUserDetails(usernameTXt.Text, passTxt.Text))
                {
                    HomeScreen hm = new HomeScreen();
                    MainClass.showWindow(hm, this, MDI.ActiveForm);
                }
                else
                {
                }
            }
        }
コード例 #12
0
        private void stockBtn_Click(object sender, EventArgs e)
        {
            Stocks u = new Stocks();

            MainClass.showWindow(u, this, MDI.ActiveForm);
        }
コード例 #13
0
        private void settingToolStripMenuItem_Click(object sender, EventArgs e)
        {
            settings set = new settings();

            MainClass.showWindow(set, this);
        }
コード例 #14
0
        private void button2_Click(object sender, EventArgs e)
        {
            products p = new products();

            MainClass.showWindow(p, this, MDi.ActiveForm);
        }
コード例 #15
0
        public override void backBtn_Click_1(object sender, EventArgs e)
        {
            PurchaseInvoice obj = new PurchaseInvoice();

            MainClass.showWindow(obj, this, MDI.ActiveForm);
        }
コード例 #16
0
ファイル: MDI.cs プロジェクト: ArshMohiuddin/IMS
        private void logoutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Login log = new Login();

            MainClass.showWindow(log, MDI.ActiveForm);
        }
コード例 #17
0
        private void catBTN_Click(object sender, EventArgs e)
        {
            categories c = new categories();

            MainClass.showWindow(c, this, MDi.ActiveForm);
        }
コード例 #18
0
        private void catBtn_Click(object sender, EventArgs e)
        {
            categories t = new categories();

            MainClass.showWindow(t, this, MDI.ActiveForm);
        }
コード例 #19
0
        private void btnBack_Click(object sender, EventArgs e)
        {
            homeScreen home = new homeScreen();

            MainClass.showWindow(home, this, MDi.ActiveForm);
        }
コード例 #20
0
        private void btnPurInvoice_Click(object sender, EventArgs e)
        {
            PurchaseInvoice pI = new PurchaseInvoice();

            MainClass.showWindow(pI, this, MDI.ActiveForm);
        }
コード例 #21
0
        private void btnUserlogin_Click(object sender, EventArgs e)
        {
            homeScreen h = new homeScreen();

            MainClass.showWindow(h, this, MDi.ActiveForm);
        }
コード例 #22
0
        private void supplierBtn_Click(object sender, EventArgs e)
        {
            Supplier s = new Supplier();

            MainClass.showWindow(s, this, MDI.ActiveForm);
        }
コード例 #23
0
        private void btnLogout_Click(object sender, EventArgs e)
        {
            Login log = new Login();

            MainClass.showWindow(log, this, MDI.ActiveForm);
        }
コード例 #24
0
        private void btnProducts_Click(object sender, EventArgs e)
        {
            Product p = new Product();

            MainClass.showWindow(p, this, MDI.ActiveForm);
        }
コード例 #25
0
        private void proDD_Click(object sender, EventArgs e)
        {
            products u = new products();

            MainClass.showWindow(u, this, MDI.ActiveForm);
        }
コード例 #26
0
        private void button5_Click(object sender, EventArgs e)
        {
            Sales u = new Sales();

            MainClass.showWindow(u, this, MDI.ActiveForm);
        }
コード例 #27
0
        private void button1_Click(object sender, EventArgs e)
        {
            HomeScreen obj = new HomeScreen();

            MainClass.showWindow(obj, this, MDI.ActiveForm);
        }
コード例 #28
0
        private void button1_Click(object sender, EventArgs e)
        {
            Users u = new Users();

            MainClass.showWindow(u, this, MDi.ActiveForm);
        }
コード例 #29
0
        private void btnSupplier_Click(object sender, EventArgs e)
        {
            Supplier p = new Supplier();

            MainClass.showWindow(p, this, MDI.ActiveForm);
        }
コード例 #30
0
        private void purchaseBtn_Click(object sender, EventArgs e)
        {
            PurchaseInvoice p = new PurchaseInvoice();

            MainClass.showWindow(p, this, MDI.ActiveForm);
        }