Ejemplo n.º 1
0
        private void ImportData()
        {
            List <Customer> customers = ExcelHelper.LoadCustomer(out StringBuilder error);

            foreach (var item in customers)
            {
                item.Status = ModifyMode.Insert;
                CustommersData.Add(item);
            }

            if (error != null && error.Length > 0)
            {
                ClientCommon.ShowErrorBox(error.ToString());
            }
        }
Ejemplo n.º 2
0
        private void ImportData()
        {
            List <KichBanKetChuyentable> kichBanKetChuyentables = ExcelHelper.LoadKichBanKC(out StringBuilder error);

            //Lưu invoice chưa có InvoiceID
            foreach (var item in kichBanKetChuyentables)
            {
                this.KichBanKetChuyentableData.Add(item);
            }
            //   this.S35InvoiceData = new BindingList<Invoice>(result);
            if (error != null && error.Length > 0)
            {
                ClientCommon.ShowErrorBox(error.ToString());
            }
        }
Ejemplo n.º 3
0
        private void ImportData(int type)
        {
            StringBuilder error = null;

            switch (type)
            {
            case 1:
                List <ItemType> itemType = ExcelHelper.LoadItemType(out error);
                foreach (var item2 in itemType)
                {
                    item2.Status = ModifyMode.Insert;
                    ItemTypeData.Add(item2);
                }
                break;

            case 2:
                List <ItemUnit> itemUnit = ExcelHelper.LoadItemUnit(out error);
                foreach (var item3 in itemUnit)
                {
                    item3.Status = ModifyMode.Insert;
                    ItemUnitData.Add(item3);
                }
                break;

            case 3:
                List <Items> customers = ExcelHelper.LoadItems(out error);
                foreach (var item in customers)
                {
                    item.Status = ModifyMode.Insert;
                    ItemsData.Add(item);
                }
                break;
            }

            if (error != null && error.Length > 0)
            {
                ClientCommon.ShowErrorBox(error.ToString());
            }
        }