Biskilog POS desktop appilcation
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.

112 lines
3.8 KiB

using BiskLog_Point_Of_Sale.Multiple_Login;
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 NewCompany : Form
{
Holder holding;
public static string company_name, company_address, company_website, company_email, company_tin, company_vat,company_telephone;
public static string branchAlias, branch_address, branch_city, branch_province, branch_telephone;
public NewCompany(Holder holder)
{
InitializeComponent();
holding = holder;
}
private void NewCompany_Load(object sender, EventArgs e)
{
}
private void MetroToggle1_CheckedChanged(object sender, EventArgs e)
{
if (metroToggle1.Checked)
{
label5.Text = "Main branch telephone";
labelCity.Visible = false;
txtCity.Visible = false;
a4.Visible = false;
}
else
{
label5.Text = "Telephone";
labelCity.Visible = true;
txtCity.Visible = true;
if (a1.Visible)
{
a4.Visible = true;
}
}
}
private void Button1_Click(object sender, EventArgs e)
{
company_name = txtname.Text.ToUpper();
company_address = txtaddress.Text.ToUpper();
company_email = txtmail.Text.ToUpper();
company_tin = txtTin.Text.ToUpper();
company_website = txtweb.Text.ToLower();
company_telephone = txtTel.Text;
company_vat = txtVat.Text;
if (metroToggle1.Checked)
{
if (!String.IsNullOrEmpty(txtname.Text) && !String.IsNullOrEmpty(txtTin.Text) && !String.IsNullOrEmpty(txtTel.Text))
{
holding.moveToBranch("company");
}
else
{
a1.Visible = true;
a2.Visible = true;
a3.Visible = true;
string title = "Essential fields empty";
string message = "Fields with asterisk have to be filled to continue";
NoAction noAction = new NoAction(title, message);
noAction.BringToFront();
noAction.ShowDialog();
}
}
else
{
if (!String.IsNullOrEmpty(txtname.Text) && !String.IsNullOrEmpty(txtCity.Text) && !String.IsNullOrEmpty(txtTel.Text) && !String.IsNullOrEmpty(txtTin.Text))
{
branchAlias = "Main branch";
branch_address = company_address;
branch_city = txtCity.Text;
branch_telephone = company_telephone;
branch_province = "";
holding.moveToFinal("NewComp");
}
else
{
a1.Visible = true;
a2.Visible = true;
a3.Visible = true;
a4.Visible = true;
string title = "Essential fields empty";
string message = "Fields with asterisk have to be filled to continue";
NoAction noAction = new NoAction(title, message);
noAction.BringToFront();
noAction.ShowDialog();
}
}
}
private void Button2_Click(object sender, EventArgs e)
{
holding.moveToFirst();
}
}
}