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.
47 lines
1.6 KiB
47 lines
1.6 KiB
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 GenerateCode : Form
|
|
{
|
|
TagsAndCodes tagsAndCodes;
|
|
int BaseQTY;
|
|
public GenerateCode(TagsAndCodes tagsAndCodes, List<FundamentalQuantities> units, int BaseQTY)
|
|
{
|
|
InitializeComponent();
|
|
this.tagsAndCodes = tagsAndCodes;
|
|
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();
|
|
// tagsAndCodes.printBarcode(barcode, toprint);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|