Esempio n. 1
0
        private void 選択した商品を印刷SToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.dataGridView1.ExtendSelection();

            List <Item> items = new List <Item>();

            kaede2nd.Dao.IItemDao idao = GlobalData.getIDao <kaede2nd.Dao.IItemDao>();
            for (int i = 0; i < this.dataGridView1.SelectedRows.Count; i++)
            {
                var itl = idao.GetItemById(this.recentList[i].item_id);
                if (itl.Count == 0)
                {
                    continue;
                }
                items.Add(itl[0]);
            }

            items.Sort(delegate(Item a, Item b) { return(a.item_id.CompareTo(b.item_id)); });

            foreach (Item it in items)
            {
                RecentItemSet ris = this.GetItemSetFromId(it.item_id);
                if (ris != null)
                {
                    ris.printed = true;
                }
            }

            ItemsPrintDocument.PrintItems(items);
            this.ReDraw();
        }
Esempio n. 2
0
        private void DoPrint(bool printAll)
        {
            this.DeleteOldPrinted();

            List <Item> items      = new List <Item>();
            uint        printCount = 0;

            kaede2nd.Dao.IItemDao idao = GlobalData.getIDao <kaede2nd.Dao.IItemDao>();
            for (int cnt = 0; cnt < this.recentList.Count; cnt++)
            {
                var itl = idao.GetItemById(this.recentList[cnt].item_id);
                if (itl.Count == 0)
                {
                    continue;
                }


                if (printAll == false)
                {
                    if ((printCount + itl[0].GetTagPrintCount()) > this.countPerPage)
                    {
                        break;
                    }
                }

                items.Add(itl[0]);
                this.recentList[cnt].printed = true;
                printCount += itl[0].GetTagPrintCount();
            }

            ItemsPrintDocument.PrintItems(items);

            this.ReDraw();
        }
Esempio n. 3
0
        private void タグを印刷ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.IsEditable() == false)
            {
                return;
            }

            List <Item> items = new List <Item>();

            for (int i = 0; i < this.formDGV.SelectedRows.Count; i++)
            {
                DataGridViewRow row = this.formDGV.SelectedRows[i];

                if (row.Cells[ColumnName.shinaBan].Value == null)
                {
                }
                else
                {
                    items.Add(this.GetItemFromList((UInt32)row.Cells[ColumnName.shinaBan].Value));
                }
            }

            items.Sort(delegate(Item a, Item b) { return(a.item_id.CompareTo(b.item_id)); });

            ItemsPrintDocument.PrintItems(items);
        }
Esempio n. 4
0
        private void PrintSelections()
        {
            var rows = this.dataGridView1.SelectedRows;

            List <Item> items   = new List <Item>();
            var         itemDao = GlobalData.getIDao <IItemDao>();

            if (rows.Count == 0)
            {
                return;
            }
            for (int i = 0; i < rows.Count; i++)
            {
                items.AddRange(itemDao.GetReceiptItem((UInt32)rows[i].Cells[ColumnName.hyouBan].Value));
            }

            ItemsPrintDocument.PrintItems(items);
        }