コード例 #1
0
        public void printBarcode(string barcode, string category, string subcategory, string purchaseamt, string sellingamt, string size, string total, int i)
        {
            btApp    = new BarTender.ApplicationClass();
            btFormat = btApp.Formats.Open(Environment.CurrentDirectory + "\\Barcode.btw", false, "");
            try
            {
                btFormat.SetNamedSubStringValue("barcode", barcode);
            }
            catch { }
            try
            {
                btFormat.SetNamedSubStringValue("category", category);
            }
            catch { }
            try
            {
                btFormat.SetNamedSubStringValue("size", size);
            }
            catch { }
            try
            {
                btFormat.SetNamedSubStringValue("subcategory", subcategory);
            }
            catch { }

            try
            {
                btFormat.SetNamedSubStringValue("sellingamt", sellingamt);
            }
            catch { }

            btFormat.Print("Job" + (i + 1), false, -1, out btMsgs);
        }
コード例 #2
0
        public void printBarcode(string barcode1, string barcode2, string category1, string category2, string subcategory1, string subcategory2, string sellingamt1, string sellingamt2, string size1, string size2, int i)
        {
            btApp    = new BarTender.ApplicationClass();
            btFormat = btApp.Formats.Open(System.Windows.Forms.Application.StartupPath + "\\Barcode2.btw", false, "");
            try
            {
                btFormat.SetNamedSubStringValue("barcode1", barcode1);
                btFormat.SetNamedSubStringValue("barcode2", barcode2);
            }
            catch { }
            try
            {
                btFormat.SetNamedSubStringValue("category1", category1);
                btFormat.SetNamedSubStringValue("category2", category2);
            }
            catch { }
            try
            {
                btFormat.SetNamedSubStringValue("subcategory1", subcategory1);
                btFormat.SetNamedSubStringValue("subcategory2", subcategory2);
            }
            catch { }

            try
            {
                btFormat.SetNamedSubStringValue("sellingamt1", sellingamt1);
                btFormat.SetNamedSubStringValue("sellingamt2", sellingamt2);
            }
            catch { }
            try
            {
                btFormat.SetNamedSubStringValue("size1", size1);
                btFormat.SetNamedSubStringValue("size2", size2);
            }
            catch { }
            btFormat.Print("Job" + (i + 1), false, -1, out btMsgs);
        }