public long LastItemIndex(long changeTableId) { TenderQuantityTableChanges tbl; tbl = TenderQuantityTableChanges.FirstOrDefault(a => a.Id == changeTableId); return(tbl.LastItemIndex()); }
public void DeleteExistingTenderQuantityTable(long tableId, long currentTableId) { TenderQuantityTableChanges tenderQuantityTable = TenderQuantityTableChanges.FirstOrDefault(t => t.Id == tableId); tenderQuantityTable.DeleteExistingTenderQuantityTable(currentTableId); EntityUpdated(); }
public void UpdateQuantityTableName(long tableId, string name) { TenderQuantityTableChanges quantityTable = TenderQuantityTableChanges.FirstOrDefault(q => q.Id == tableId); quantityTable.UpdateName(name); EntityUpdated(); }
public TenderQuantityTableChanges CreateTenderQuantityTables(long tableId, string name, int formId) { var table = new TenderQuantityTableChanges(tableId, string.IsNullOrEmpty(name) ? "اسم الجدول" : name, QuantityTableChangeStatus.Add, formId); TenderQuantityTableChanges.Add(table); EntityUpdated(); return(table); }
public void SaveTenderQuantityTableItems(List <TenderQuantityItemDTO> table, string tableName) { TenderQuantityTableChanges tbl; long tableId = table[0].TableId; tbl = TenderQuantityTableChanges.FirstOrDefault(a => a.Id == tableId); tbl = tbl.SaveQuantityTableBulkItems(tableId, table, tableName); EntityUpdated(); }
public TenderChangeRequest SaveTenderQuantityTables(List <TenderQuantityItemDTO> table, long currentItemId, out long itemId, long changeTableId) { TenderQuantityTableChanges tbl; tbl = TenderQuantityTableChanges.FirstOrDefault(a => a.Id == changeTableId); tbl = tbl.SaveQuantityTableItems(changeTableId, table, currentItemId, out itemId); EntityUpdated(); return(this); }
public void DeleteTenderQuantityTableWithItems(int tableId) { TenderQuantityTableChanges tenderQuantityTable = TenderQuantityTableChanges.FirstOrDefault(t => t.Id == tableId); if (tenderQuantityTable != null) { tenderQuantityTable.DeleteTenderQuantityTableWithItems(); } EntityUpdated(); }
public TenderQuantityTableChanges DeleteQuantityTableItemsChanges(long tableId, int itemNumber) { TenderQuantityTableChanges table = TenderQuantityTableChanges.FirstOrDefault(a => a.Id == tableId && a.IsActive == true); //Starting from 1 if (table != null) { table.DeleteQuantityTableItem(itemNumber); } EntityUpdated(); return(table); }