This commit is contained in:
@@ -81,15 +81,24 @@ namespace AyaNova.DataList
|
|||||||
SqlValueColumnName = "aservicebank.objecttype"
|
SqlValueColumnName = "aservicebank.objecttype"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||||
|
// {
|
||||||
|
// TKey = "ServiceBankDescription",
|
||||||
|
// FieldKey = "ServiceBankDescription",
|
||||||
|
// AyaObjectType = (int)AyaType.ServiceBank,
|
||||||
|
// UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
|
// SqlIdColumnName = "aservicebank.id",
|
||||||
|
// SqlValueColumnName = "aservicebank.name",
|
||||||
|
// IsRowId = true
|
||||||
|
// });
|
||||||
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||||
{
|
{
|
||||||
TKey = "ServiceBankDescription",
|
TKey = "ServiceBankDescription",
|
||||||
FieldKey = "ServiceBankDescription",
|
FieldKey = "ServiceBankDescription",
|
||||||
AyaObjectType = (int)AyaType.ServiceBank,
|
AyaObjectType = (int)AyaType.ServiceBank,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "aservicebank.id",
|
SqlValueColumnName = "aservicebank.name"
|
||||||
SqlValueColumnName = "aservicebank.name",
|
|
||||||
IsRowId = true
|
|
||||||
});
|
});
|
||||||
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ namespace AyaNova.Biz
|
|||||||
using (var transaction = await ct.Database.BeginTransactionAsync())
|
using (var transaction = await ct.Database.BeginTransactionAsync())
|
||||||
{
|
{
|
||||||
//get the last record
|
//get the last record
|
||||||
var LastEntry = await ct.ServiceBank.OrderByDescending(m => m.EntryDate).SingleOrDefaultAsync(m => m.ObjectId == newDtObject.ObjectId && m.ObjectType == newDtObject.ObjectType);
|
var LastEntry = await ct.ServiceBank.OrderByDescending(m => m.EntryDate).FirstOrDefaultAsync(m => m.ObjectId == newDtObject.ObjectId && m.ObjectType == newDtObject.ObjectType);
|
||||||
ServiceBank newObject = new ServiceBank();
|
ServiceBank newObject = new ServiceBank();
|
||||||
newObject.Name = newDtObject.Name;
|
newObject.Name = newDtObject.Name;
|
||||||
newObject.EntryDate = DateTime.UtcNow;
|
newObject.EntryDate = DateTime.UtcNow;
|
||||||
|
|||||||
Reference in New Issue
Block a user