This commit is contained in:
2021-01-18 23:35:17 +00:00
parent c01e7c1e64
commit 247c600e15
5 changed files with 5 additions and 16 deletions

View File

@@ -109,15 +109,7 @@ namespace AyaNova.DataList
SqlValueColumnName = "apart.retail" SqlValueColumnName = "apart.retail"
}); });
FieldDefinitions.Add(new AyaDataListFieldDefinition
{
TKey = "PartTrackSerialNumber",
FieldKey = "PartTrackSerialNumber",
UiFieldDataType = (int)UiFieldDataType.Bool,
SqlValueColumnName = "apart.trackserialnumber"
});
FieldDefinitions.Add(new AyaDataListFieldDefinition FieldDefinitions.Add(new AyaDataListFieldDefinition
{ {
FieldKey = "PartManufacturerID", FieldKey = "PartManufacturerID",

View File

@@ -466,7 +466,6 @@ namespace AyaNova.Biz
l.Add(new AyaFormFieldDefinition { TKey = "PartPartNumber", FieldKey = "PartPartNumber", Hideable = false }); l.Add(new AyaFormFieldDefinition { TKey = "PartPartNumber", FieldKey = "PartPartNumber", Hideable = false });
l.Add(new AyaFormFieldDefinition { TKey = "PartCost", FieldKey = "PartCost", Hideable = false }); l.Add(new AyaFormFieldDefinition { TKey = "PartCost", FieldKey = "PartCost", Hideable = false });
l.Add(new AyaFormFieldDefinition { TKey = "PartRetail", FieldKey = "PartRetail", Hideable = false }); l.Add(new AyaFormFieldDefinition { TKey = "PartRetail", FieldKey = "PartRetail", Hideable = false });
l.Add(new AyaFormFieldDefinition { TKey = "PartTrackSerialNumber", FieldKey = "PartTrackSerialNumber", Hideable = false });
l.Add(new AyaFormFieldDefinition { TKey = "PartManufacturerID", FieldKey = "PartManufacturerID" }); l.Add(new AyaFormFieldDefinition { TKey = "PartManufacturerID", FieldKey = "PartManufacturerID" });
l.Add(new AyaFormFieldDefinition { TKey = "PartManufacturerNumber", FieldKey = "PartManufacturerNumber" }); l.Add(new AyaFormFieldDefinition { TKey = "PartManufacturerNumber", FieldKey = "PartManufacturerNumber" });

View File

@@ -37,15 +37,13 @@ namespace AyaNova.Models
public decimal Retail { get; set; } public decimal Retail { get; set; }
public string UnitOfMeasure { get; set; } public string UnitOfMeasure { get; set; }
public string UPC { get; set; } public string UPC { get; set; }
[Required]
public bool TrackSerialNumber { get; set; }
public Part() public Part()
{ {
Tags = new List<string>(); Tags = new List<string>();
Active = true; Active = true;
TrackSerialNumber = false;
Cost = 0m; Cost = 0m;
Retail = 0m; Retail = 0m;
} }

View File

@@ -22,7 +22,7 @@ namespace AyaNova.Util
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!! //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
private const int DESIRED_SCHEMA_LEVEL = 15; private const int DESIRED_SCHEMA_LEVEL = 15;
internal const long EXPECTED_COLUMN_COUNT = 667; internal const long EXPECTED_COLUMN_COUNT = 666;
internal const long EXPECTED_INDEX_COUNT = 115; internal const long EXPECTED_INDEX_COUNT = 115;
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!! //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
@@ -662,7 +662,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
"notes text, wiki text, customfields text, tags varchar(255) ARRAY, " + "notes text, wiki text, customfields text, tags varchar(255) ARRAY, " +
"partnumber text not null unique, manufacturerid bigint REFERENCES avendor, manufacturernumber text, " + "partnumber text not null unique, manufacturerid bigint REFERENCES avendor, manufacturernumber text, " +
"wholesalerid bigint REFERENCES avendor, wholesalernumber text, alternativewholesalerid bigint REFERENCES avendor, alternativewholesalernumber text, " + "wholesalerid bigint REFERENCES avendor, wholesalernumber text, alternativewholesalerid bigint REFERENCES avendor, alternativewholesalernumber text, " +
"cost decimal(19,4) not null, retail decimal(19,4) not null, unitofmeasure text, upc text, trackserialnumber bool not null " + "cost decimal(19,4) not null, retail decimal(19,4) not null, unitofmeasure text, upc text " +
" )"); " )");
//PARTASSEMBLY //PARTASSEMBLY

View File

@@ -1522,7 +1522,7 @@ namespace AyaNova.Util
o.Retail = o.Cost * 1.2m; o.Retail = o.Cost * 1.2m;
o.UnitOfMeasure = "each"; o.UnitOfMeasure = "each";
o.TrackSerialNumber = false;
//This seems wrong to do in a loop but is 4 times faster this way ?!? //This seems wrong to do in a loop but is 4 times faster this way ?!?
using (AyContext ct = ServiceProviderProvider.DBContext) using (AyContext ct = ServiceProviderProvider.DBContext)