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.
48 lines
1.6 KiB
48 lines
1.6 KiB
3 months ago
|
using BiskLog_Point_Of_Sale.Classes;
|
||
|
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 PickUnit : Form
|
||
|
{
|
||
|
AddProductModule productModule;
|
||
|
int BaseQTY;
|
||
|
public PickUnit(AddProductModule productModule, List<FundamentalQuantities> units, int BaseQTY)
|
||
|
{
|
||
|
InitializeComponent();
|
||
|
this.productModule = productModule;
|
||
|
this.BaseQTY = BaseQTY;
|
||
|
fundamental.DataSource = units;
|
||
|
fundamental.DisplayMember = "shortname";
|
||
|
fundamental.SelectedIndex = -1;
|
||
|
}
|
||
|
|
||
|
private void exitBTN_Click(object sender, EventArgs e)
|
||
|
{
|
||
|
this.Close();
|
||
|
}
|
||
|
|
||
|
private void printBarcode_Click(object sender, EventArgs e)
|
||
|
{
|
||
|
if (!String.IsNullOrEmpty(fundamental.Text))
|
||
|
{
|
||
|
this.DialogResult = DialogResult.OK;
|
||
|
string unitname = (fundamental.SelectedItem as FundamentalQuantities).shortname.ToString();
|
||
|
int selectquantity = int.Parse((fundamental.SelectedItem as FundamentalQuantities).fullname.ToString());
|
||
|
int toprint = BaseQTY / selectquantity;
|
||
|
string barcode = (fundamental.SelectedItem as FundamentalQuantities).id.ToString();
|
||
|
productModule.printBarcode(barcode, toprint);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|