public void AddNewRecord() { MainRow = ContainerDataSet.Container.NewContainerRow(); MainRow.ContainerName = string.Empty; MainRow.LiquidName = string.Empty; MainRow.ContainerType = (int)ContainerKindEnum.Barrel; MainRow.CapacityDeliveredDate = DateTime.Now; ContainerDataSet.Container.AddContainerRow(MainRow); }
public void FillRecord(long containerId) { DB.Fill( ContainerDataSet.Container, new MyLib.DL.SQLSelect( ContainerDataSet.Container.TableName, string.Format("WHERE {0} = {1}", ContainerDataSet.Container.ContainerIdColumn.ColumnName, containerId))); // TODO powinno byc == 1 if (MainDataTable.Rows.Count > 0) { MainRow = MainDataTable.Rows[0] as ContainerDataSet.ContainerRow; MainRow.CapacityDeliveredDate = DateTime.Now; } }