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.

83 lines
2.3 KiB

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.Delivery
{
public partial class LoadingBay : Form
{
Form Active;
string order;
public LoadingBay(string order = null)
{
InitializeComponent();
tblPanel.Left = (panel2.Width - tblPanel.Width) / 2;
this.order = order;
}
private void LoadingBay_Load(object sender, EventArgs e)
{
if (!String.IsNullOrEmpty(order))
{
OrderAssignments(order);
}
else
{
OrderAssignments();
}
}
public void OrderAssignments(string orderID = null)
{
orderActive.Visible = true;
freeRunActive.Visible = false;
OrderAssignment products = new OrderAssignment(this, orderID);
products.TopLevel = false;
if (Active != null)
{
controlContent.Controls.Remove(Active);
}
Active = products;
controlContent.Controls.Add(products);
products.BringToFront();
products.Show();
}
public void freeRuns()
{
orderActive.Visible = false;
freeRunActive.Visible = true;
FreeLoading products = new FreeLoading();
products.TopLevel = false;
if (Active != null)
{
controlContent.Controls.Remove(Active);
}
Active = products;
controlContent.Controls.Add(products);
products.BringToFront();
products.Show();
}
private void LoadingBay_SizeChanged(object sender, EventArgs e)
{
if (Active != null)
{
Active.WindowState = FormWindowState.Minimized;
Active.WindowState = FormWindowState.Maximized;
}
}
private void label1_Click(object sender, EventArgs e)
{
OrderAssignments();
}
private void label2_Click(object sender, EventArgs e)
{
freeRuns();
}
}
}