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 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); } } } }