Exemple #1
0
        public void RemoveBarcodeSettings(int settingId)
        {
            BarcodeSetting setting = barcodeSettings.FirstOrDefault(s => s.Id == settingId);

            barcodeSettings.Remove(setting);

            SettingsDataSet.BarcodeSettingRow row = settingsDataSet.BarcodeSetting.FindById(setting.Id);
            settingsDataSet.BarcodeSetting.RemoveBarcodeSettingRow(row);

            settingsDataSet.AcceptChanges();
            Notify();
        }
Exemple #2
0
        public void AddBarcodeSetting(BarcodeSetting setting)
        {
            barcodeSettings.Add(setting);

            SettingsDataSet.BarcodeSettingRow row = settingsDataSet.BarcodeSetting.NewBarcodeSettingRow();
            row.Name       = setting.Name;
            row.Value      = setting.Value;
            row.Barcode    = GetBarcode(setting.Barcode);
            row.IsFixPrice = setting.IsFixPrice;
            settingsDataSet.BarcodeSetting.AddBarcodeSettingRow(row);

            settingsDataSet.AcceptChanges();
            Notify();
        }
Exemple #3
0
        public void EditBarcodeSetting(BarcodeSetting setting)
        {
            BarcodeSetting oldSetting = barcodeSettings.FirstOrDefault(s => s.Id == setting.Id);

            oldSetting.Name       = setting.Name;
            oldSetting.Value      = setting.Value;
            oldSetting.Barcode    = GetBarcode(setting.Barcode);
            oldSetting.IsFixPrice = setting.IsFixPrice;

            SettingsDataSet.BarcodeSettingRow row = settingsDataSet.BarcodeSetting.FindById(setting.Id);
            row.Name       = setting.Name;
            row.Value      = setting.Value;
            row.Barcode    = GetBarcode(setting.Barcode);
            row.IsFixPrice = setting.IsFixPrice;

            settingsDataSet.AcceptChanges();
            Notify();
        }