Exemple #1
0
 public BareCodeBook BookInvoce(BareCodeBook barecode, BookModels bookModels)
 {
     barecode.NameModel = bookModels.Model;
     AddObjectDb.AddObjectDb adddoc = new AddObjectDb.AddObjectDb();
     barecode.Id = adddoc.AddBookAccounting(bookModels);
     return(barecode);
 }
Exemple #2
0
        /// <summary>
        /// Генерация штрихкода на книги учета материальных ценностей
        /// </summary>
        /// <param name="barecode">Параметры кода</param>
        /// <param name="path">Путь сохранения</param>
        public void GenerateBookCode(BareCodeBook barecode, string path)
        {
            barecode.FullPathSave = path + barecode.NameModel + WordConstant.FormatPng;
            BarcodeWriter writer = new BarcodeWriter
            {
                Format  = BarcodeFormat.CODE_128,
                Options =
                {
                    PureBarcode = true,
                    Margin      =    0,
                    Height      =   75,
                    Width       = 200
                }
            };

            writer.Write(barecode.Id.ToString()).Save(barecode.FullPathSave);
        }