Exemplo n.º 1
0
        private void Init(List <t_cur_saleflow> saleInfos)
        {
            List <t_item_info> items = new List <t_item_info>();

            foreach (t_cur_saleflow saleInfo in saleInfos)
            {
                t_item_info item = new t_item_info();
                item.item_no      = saleInfo.item_no;
                item.item_subno   = saleInfo.item_subno;
                item.item_name    = saleInfo.item_name;
                item.sale_price   = saleInfo.sale_price;
                item.vip_price    = saleInfo.sale_price;
                item.base_price   = saleInfo.price;
                item.item_subname = saleInfo.item_subname;
                item.item_clsno   = saleInfo.item_clsno;
                item.unit_no      = saleInfo.unit_no;
                item.product_area = saleInfo.product_area;
                item.item_rem     = saleInfo.item_rem;
                item.main_supcust = saleInfo.main_supcust;
                item.item_size    = saleInfo.item_size;
                items.Add(item);
            }
            this.dgItem.DataSource = items;
            this.SetCloumns();
        }
Exemplo n.º 2
0
        public void AddItem(string ItemNO)
        {
            List <t_item_info> itemInfoByOne = Gattr.Bll.GetItemInfoNew(ItemNO);

            if (itemInfoByOne.Count > 0)
            {
                t_item_info _info = itemInfoByOne[0];
                DataRow     row   = this.dt.NewRow();
                row["item_no"]    = _info.item_no;
                row["item_subno"] = _info.item_subno;
                row["item_name"]  = _info.item_name;
                row["unit_no"]    = _info.unit_no;
                row["real_qty"]   = 1;
                row["other1"]     = "";
                this.dt.Rows.Add(row);
            }
            this.dgvItemList.DataSource = this.dt;
        }