private void LoginBtn_Click(object sender, EventArgs e) { if (usernameTxt.Text == "") { usernameErrorLbl.Visible = true; } else { usernameErrorLbl.Visible = false; } if (pwdTxt.Text == "") { PasswordErrorLbl.Visible = true; } else { PasswordErrorLbl.Visible = false; } if (usernameErrorLbl.Visible || PasswordErrorLbl.Visible) { MainClass.ShowMSG("Fileds with * are mandatory", "Stop", "Error"); } if (usernameTxt.Text != "" && pwdTxt.Text != "") { if (retrieval.getUserDetails(usernameTxt.Text, pwdTxt.Text)) { HomeScreen hm = new HomeScreen(); MainClass.showWindow(hm, this, MDI.ActiveForm); } } }
private void logoutToolStripMenuItem_Click(object sender, EventArgs e) { logoutToolStripMenuItem.Enabled = false; homeToolStripMenuItem.Enabled = false; Login set = new Login(); MainClass.showWindow(set, this); }
private void SaveBtn_Click(object sender, EventArgs e) { string s; string path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); if (IntSecChb.Checked) { if (ServerTxt.Text != "" && DatabaseTxt.Text != "") { s = "Data Source=" + ServerTxt.Text + ";initial Catalog=" + DatabaseTxt.Text + ";Integrated Security=true;MultipleActiveResultSets=true;"; File.WriteAllText(path + "//connect", s); DialogResult dr = MessageBox.Show("Settings Saved Successfully", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); if (dr == DialogResult.OK) { bool admincheck = retrieval.checkAdminExist(); if (admincheck == true) { Login log = new Login(); MainClass.showWindow(log, this, MDI.ActiveForm); } else { AdminEntry adm = new AdminEntry(); MainClass.showWindow(adm, this, MDI.ActiveForm); } } } else { MessageBox.Show("Please give information to continue.."); } } else { if (ServerTxt.Text != "" && DatabaseTxt.Text != "" && UserIDTxt.Text != "" && PasswordTxt.Text != "") { s = "Data Source=" + ServerTxt.Text + ";initial Catalog=" + DatabaseTxt.Text + ";User ID=" + UserIDTxt.Text + ";Password="******";MultipleActiveResultSets=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 information to continue.."); } } }
private void MDI_Load(object sender, EventArgs e) { string Path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); bool adminexist = retrieval.checkAdminExist(); if (File.Exists(Path + "\\connect")) { if (adminexist == false) { AdminEntry adm = new AdminEntry(); MainClass.showWindow(adm, this); } else { Login log = new Login(); MainClass.showWindow(log, this); } } else { settings set = new settings(); MainClass.showWindow(set, this); } }
public virtual void backBtn_Click(object sender, EventArgs e) { HomeScreen obj = new HomeScreen(); MainClass.showWindow(obj, this, MDI.ActiveForm); }
private void homeToolStripMenuItem_Click(object sender, EventArgs e) { HomeScreen home = new HomeScreen(); MainClass.showWindow(home, this); }
private void proPricingBtn_Click(object sender, EventArgs e) { ProductPricing p = new ProductPricing(); MainClass.showWindow(p, this, MDI.ActiveForm); }
private void SalesBtn_Click(object sender, EventArgs e) { Sales s = new Sales(); MainClass.showWindow(s, this, MDI.ActiveForm); }
private void PurchaseInvoiceBtn_Click(object sender, EventArgs e) { PurchaseInvoice p = new PurchaseInvoice(); MainClass.showWindow(p, this, MDI.ActiveForm); }
private void CatogoryBtn_Click(object sender, EventArgs e) { Categories c = new Categories(); MainClass.showWindow(c, this, MDI.ActiveForm); }
private void userBtn_Click(object sender, EventArgs e) { Users u = new Users(); MainClass.showWindow(u, this, MDI.ActiveForm); }
private void SalesReturnBtn_Click(object sender, EventArgs e) { SalesReturnWindow sr = new SalesReturnWindow(); MainClass.showWindow(sr, this, MDI.ActiveForm); }
public override void backBtn_Click(object sender, EventArgs e) { PurchaseInvoice obj = new PurchaseInvoice(); MainClass.showWindow(obj, this, MDI.ActiveForm); }
public override void ViewBtn_Click(object sender, EventArgs e) { ViewSalesInvoice vws = new ViewSalesInvoice(); MainClass.showWindow(vws, this, MDI.ActiveForm); }
private void logInBtn_Click(object sender, EventArgs e) { Login log = new Login(); MainClass.showWindow(log, this, MDI.ActiveForm); }
public override void ViewBtn_Click(object sender, EventArgs e) { PurchaseInvoiceDetails piDetail = new PurchaseInvoiceDetails(); MainClass.showWindow(piDetail, this, ActiveForm); }