You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
139 lines
3.7 KiB
139 lines
3.7 KiB
3 months ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.ComponentModel;
|
||
|
using System.Data;
|
||
|
using System.Drawing;
|
||
|
using System.Linq;
|
||
|
using System.Text;
|
||
|
using System.Threading.Tasks;
|
||
|
using System.Windows.Forms;
|
||
|
|
||
|
namespace BiskLog_Point_Of_Sale.Company_Setup
|
||
|
{
|
||
|
public partial class Holder : Form
|
||
|
{
|
||
|
Form Active;
|
||
|
public static string decision = "";
|
||
|
bool newCompany;
|
||
|
public Holder(bool company)
|
||
|
{
|
||
|
InitializeComponent();
|
||
|
newCompany = company;
|
||
|
}
|
||
|
|
||
|
private void Exit_Click(object sender, EventArgs e)
|
||
|
{
|
||
|
exitApp();
|
||
|
}
|
||
|
|
||
|
private void Exit_MouseEnter(object sender, EventArgs e)
|
||
|
{
|
||
|
exit.BackColor = Color.Crimson;
|
||
|
}
|
||
|
|
||
|
private void Exit_MouseLeave(object sender, EventArgs e)
|
||
|
{
|
||
|
exit.BackColor = Color.Transparent;
|
||
|
}
|
||
|
|
||
|
private void Holder_Load(object sender, EventArgs e)
|
||
|
{
|
||
|
if (newCompany)
|
||
|
{
|
||
|
moveToNewCompany();
|
||
|
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
moveToDBLocation();
|
||
|
//moveToBranch("main");
|
||
|
}
|
||
|
}
|
||
|
public void exitApp()
|
||
|
{
|
||
|
decision = "";
|
||
|
this.Close();
|
||
|
}
|
||
|
public void moveToFirst()
|
||
|
{
|
||
|
decision = "hold";
|
||
|
FirstPage first = new FirstPage();
|
||
|
first.BringToFront();
|
||
|
first.Show();
|
||
|
this.Hide();
|
||
|
}
|
||
|
public void moveToDBLocation()
|
||
|
{
|
||
|
DatabaseLocation finalStep = new DatabaseLocation(this);
|
||
|
finalStep.TopLevel = false;
|
||
|
if (Active != null)
|
||
|
{
|
||
|
content.Controls.Remove(Active);
|
||
|
}
|
||
|
Active = finalStep;
|
||
|
content.Controls.Add(finalStep);
|
||
|
finalStep.BringToFront();
|
||
|
finalStep.Show();
|
||
|
}
|
||
|
public void moveToLogin()
|
||
|
{
|
||
|
this.Hide();
|
||
|
MainLogin finalStep = new MainLogin(this);
|
||
|
finalStep.BringToFront();
|
||
|
finalStep.ShowDialog();
|
||
|
}
|
||
|
public void moveToFinalBranch()
|
||
|
{
|
||
|
FinalBranch branchSetup = new FinalBranch(this);
|
||
|
branchSetup.TopLevel = false;
|
||
|
if (Active != null)
|
||
|
{
|
||
|
content.Controls.Remove(Active);
|
||
|
}
|
||
|
Active = branchSetup;
|
||
|
content.Controls.Add(branchSetup);
|
||
|
branchSetup.BringToFront();
|
||
|
branchSetup.Show();
|
||
|
}
|
||
|
public void moveToBranch(string back)
|
||
|
{
|
||
|
BranchSetup branchSetup = new BranchSetup(this, back);
|
||
|
branchSetup.TopLevel = false;
|
||
|
if (Active != null)
|
||
|
{
|
||
|
content.Controls.Remove(Active);
|
||
|
}
|
||
|
Active = branchSetup;
|
||
|
content.Controls.Add(branchSetup);
|
||
|
branchSetup.BringToFront();
|
||
|
branchSetup.Show();
|
||
|
}
|
||
|
public void moveToFinal(string location)
|
||
|
{
|
||
|
FinalStep finalStep = new FinalStep(this, location);
|
||
|
finalStep.TopLevel = false;
|
||
|
if (Active != null)
|
||
|
{
|
||
|
content.Controls.Remove(Active);
|
||
|
}
|
||
|
Active = finalStep;
|
||
|
content.Controls.Add(finalStep);
|
||
|
finalStep.BringToFront();
|
||
|
finalStep.Show();
|
||
|
}
|
||
|
public void moveToNewCompany()
|
||
|
{
|
||
|
NewCompany formCat = new NewCompany(this);
|
||
|
formCat.TopLevel = false;
|
||
|
if (Active != null)
|
||
|
{
|
||
|
content.Controls.Remove(Active);
|
||
|
}
|
||
|
Active = formCat;
|
||
|
content.Controls.Add(formCat);
|
||
|
formCat.BringToFront();
|
||
|
formCat.Show();
|
||
|
}
|
||
|
}
|
||
|
}
|