private void userBtn_Click(object sender, EventArgs e) { //Users user = new Users(); Users t = new Users(); MainClass.showWindow(t, this, MDI.ActiveForm); }
private void logoutToolStripMenuItem_Click(object sender, EventArgs e) { MDI.logoutToolStripMenuItem.Enabled = false; login set = new login(); MainClass.showWindow(set, this); }
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 { } } }
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); } }
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."); } } }
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"); } } }
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"); } }
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..."); } } }
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"); } } }
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 { } } } }
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 { } } }
private void stockBtn_Click(object sender, EventArgs e) { Stocks u = new Stocks(); MainClass.showWindow(u, this, MDI.ActiveForm); }
private void settingToolStripMenuItem_Click(object sender, EventArgs e) { settings set = new settings(); MainClass.showWindow(set, this); }
private void button2_Click(object sender, EventArgs e) { products p = new products(); MainClass.showWindow(p, this, MDi.ActiveForm); }
public override void backBtn_Click_1(object sender, EventArgs e) { PurchaseInvoice obj = new PurchaseInvoice(); MainClass.showWindow(obj, this, MDI.ActiveForm); }
private void logoutToolStripMenuItem_Click(object sender, EventArgs e) { Login log = new Login(); MainClass.showWindow(log, MDI.ActiveForm); }
private void catBTN_Click(object sender, EventArgs e) { categories c = new categories(); MainClass.showWindow(c, this, MDi.ActiveForm); }
private void catBtn_Click(object sender, EventArgs e) { categories t = new categories(); MainClass.showWindow(t, this, MDI.ActiveForm); }
private void btnBack_Click(object sender, EventArgs e) { homeScreen home = new homeScreen(); MainClass.showWindow(home, this, MDi.ActiveForm); }
private void btnPurInvoice_Click(object sender, EventArgs e) { PurchaseInvoice pI = new PurchaseInvoice(); MainClass.showWindow(pI, this, MDI.ActiveForm); }
private void btnUserlogin_Click(object sender, EventArgs e) { homeScreen h = new homeScreen(); MainClass.showWindow(h, this, MDi.ActiveForm); }
private void supplierBtn_Click(object sender, EventArgs e) { Supplier s = new Supplier(); MainClass.showWindow(s, this, MDI.ActiveForm); }
private void btnLogout_Click(object sender, EventArgs e) { Login log = new Login(); MainClass.showWindow(log, this, MDI.ActiveForm); }
private void btnProducts_Click(object sender, EventArgs e) { Product p = new Product(); MainClass.showWindow(p, this, MDI.ActiveForm); }
private void proDD_Click(object sender, EventArgs e) { products u = new products(); MainClass.showWindow(u, this, MDI.ActiveForm); }
private void button5_Click(object sender, EventArgs e) { Sales u = new Sales(); MainClass.showWindow(u, this, MDI.ActiveForm); }
private void button1_Click(object sender, EventArgs e) { HomeScreen obj = new HomeScreen(); MainClass.showWindow(obj, this, MDI.ActiveForm); }
private void button1_Click(object sender, EventArgs e) { Users u = new Users(); MainClass.showWindow(u, this, MDi.ActiveForm); }
private void btnSupplier_Click(object sender, EventArgs e) { Supplier p = new Supplier(); MainClass.showWindow(p, this, MDI.ActiveForm); }
private void purchaseBtn_Click(object sender, EventArgs e) { PurchaseInvoice p = new PurchaseInvoice(); MainClass.showWindow(p, this, MDI.ActiveForm); }