private void loginButton_Click(object sender, EventArgs e) { if (usernameTextBox.Text == "") { nameErrorLabel.Visible = true; } else { nameErrorLabel.Visible = false; } if (passwordTextBox.Text == "") { passwordErrorLabel.Visible = true; } else { passwordErrorLabel.Visible = false; } if (nameErrorLabel.Visible || passwordErrorLabel.Visible) { MainClass.ShowMsg("Fields with * are mandatory", "Stop", "Error");//Error is the type of msg } else { if (retrival.getUserDetails(usernameTextBox.Text, passwordTextBox.Text)) { HomeScreen hs = new HomeScreen(); MainClass.showWindow(hs, 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 saveButton_Click(object sender, EventArgs e) { string s; string path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); if (isCB.Checked) { if (serverTextBox.Text != "" && databaseTextBox.Text != "") { s = "Data Source=" + serverTextBox.Text + ";Initial Catalog=" + databaseTextBox.Text + ";Integrated Security=True; MultipleActivaResultSets=true"; File.WriteAllText(path + "\\connect", s); DialogResult dr = MessageBox.Show("Setting 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 continue...."); } } else { if (serverTextBox.Text != "" && databaseTextBox.Text != "" && userTextBox.Text != "" && passwordTextBox.Text != "") { s = "Data Source=" + serverTextBox.Text + ";Initial Catalog=" + databaseTextBox.Text + ";User ID=" + userTextBox.Text + ";Password="******";MultipleActivaResultSets=true;"; File.WriteAllText(path + "\\connect", s); DialogResult dr = MessageBox.Show("Setting 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 continue...."); } } }
private void button1_Click(object sender, EventArgs e) { ProductPricing pp = new ProductPricing(); MainClass.showWindow(pp, this, MDI.ActiveForm);; }
private void stockButton_Click(object sender, EventArgs e) { Stocks pi = new Stocks(); MainClass.showWindow(pi, this, MDI.ActiveForm);; }
private void purchaseButton_Click(object sender, EventArgs e) { PurchaseInvoice pi = new PurchaseInvoice(); MainClass.showWindow(pi, this, MDI.ActiveForm);; }
private void supplierButton_Click(object sender, EventArgs e) { Supplier s = new Supplier(); MainClass.showWindow(s, this, MDI.ActiveForm); }
private void productsButton_Click(object sender, EventArgs e) { Products p = new Products(); MainClass.showWindow(p, this, MDI.ActiveForm); }
private void categoriButton_Click(object sender, EventArgs e) { Categories c = new Categories(); MainClass.showWindow(c, this, MDI.ActiveForm); }
private void usersButton_Click(object sender, EventArgs e) { Users u = new Users(); MainClass.showWindow(u, this, MDI.ActiveForm); }
public override void backButton_Click(object sender, EventArgs e) { PurchaseInvoice obj = new PurchaseInvoice(); MainClass.showWindow(obj, this, MDI.ActiveForm); }
private void logoutToolStripMenuItem_Click(object sender, EventArgs e) { login set = new login(); MainClass.showWindow(set, this); }
private void settingsToolStripMenuItem_Click(object sender, EventArgs e) { Settings set = new Settings(); MainClass.showWindow(set, this); }
public override void viewButton_Click(object sender, EventArgs e) { PurchaseInvoiceDetails pid = new PurchaseInvoiceDetails(); MainClass.showWindow(pid, this, MDI.ActiveForm); }
public virtual void backButton_Click(object sender, EventArgs e) { HomeScreen obj = new HomeScreen(); MainClass.showWindow(obj, this, MDI.ActiveForm); }