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.

122 lines
3.9 KiB

using Point_Of_Sale_Managment;
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.Products_Module
{
public partial class ProductsMainHolder : Form
{
Form Active;
public ProductsMainHolder()
{
InitializeComponent();
}
public void MoveToProduct()
{
branchActive.Visible = true;
rolesActive.Visible = false;
pref1Active.Visible = false;
tagsActive.Visible = false;
ProductListForm products = new ProductListForm(this);
products.TopLevel = false;
if (Active != null)
{
content.Controls.Remove(Active);
}
Active = products;
content.Controls.Add(products);
products.BringToFront();
products.LoadRecords();
products.Show();
}
private void Label3_Click(object sender, EventArgs e)
{
MoveToProduct();
}
public void MoveToStock(string productCode = null, string quantity = null)
{
branchActive.Visible = false;
rolesActive.Visible = false;
pref1Active.Visible = true;
tagsActive.Visible = false;
StockForm user = new StockForm(this, code: productCode, oldquantity: quantity);
user.TopLevel = false;
if (Active != null)
{
content.Controls.Remove(Active);
}
content.Controls.Add(user);
Active = user;
user.BringToFront();
user.Show();
}
private void Label2_Click(object sender, EventArgs e)
{
MoveToStock();
}
private void ProductsMainHolder_SizeChanged(object sender, EventArgs e)
{
if (Active != null)
{
Active.WindowState = FormWindowState.Minimized;
Active.WindowState = FormWindowState.Maximized;
}
}
private void ProductsMainHolder_Load(object sender, EventArgs e)
{
MoveToProduct();
}
public void MoveToPrices(string procode = null, string price = null, string name = null)
{
branchActive.Visible = false;
rolesActive.Visible = true;
pref1Active.Visible = false;
tagsActive.Visible = false;
Prices changePrices = new Prices(this, code: procode, name: name, previous_price: price);
changePrices.TopLevel = false;
if (Active != null)
{
content.Controls.Remove(Active);
}
Active = changePrices;
content.Controls.Add(changePrices);
changePrices.BringToFront();
changePrices.Show();
}
private void Label4_Click(object sender, EventArgs e)
{
MoveToPrices();
}
public void MoveToTags(string productCode = null, string productName = null, string price = null, string quantity = null,string barcode = null)
{
branchActive.Visible = false;
rolesActive.Visible = false;
pref1Active.Visible = false;
tagsActive.Visible = true;
TagsAndCodes tags = new TagsAndCodes(this, productCode, productName, price, quantity,barcode);
tags.TopLevel = false;
if (Active != null)
{
content.Controls.Remove(Active);
}
Active = tags;
content.Controls.Add(tags);
tags.BringToFront();
tags.Show();
}
private void Label1_Click(object sender, EventArgs e)
{
MoveToTags();
}
}
}