public override DateTime GetFileDate(string file) { if (decParser.ParseDeclarationFile(file) == ReturnCode.SUCCESS) { return(decParser.FromTime); } return(DateTime.MinValue); }
public void LoadDECFile(string fileName) { if (decFile.ParseDeclarationFile(fileName) == ReturnCode.SUCCESS) { FacilityTextBox.Text = decFile.Facility; MBATextBox.Text = decFile.MBA; FromTimePicker.Value = decFile.FromTime; FromDatePicker.Value = decFile.FromTime; ToTimePicker.Value = decFile.ToTime; ToDatePicker.Value = decFile.ToTime; ItemNameTextBox.Text = decFile.ItemName; OriginTimePicker.Value = decFile.ItemOriginDate; OriginDatePicker.Value = decFile.ItemOriginDate; FullNameTextBox.Text = decFile.FullName; BarCodeTextBox.Text = decFile.Barcode; MassTextBox.Text = decFile.Mass.ToString(); MassTimePicker.Value = decFile.MassDate; MassDatePicker.Value = decFile.MassDate; BatchNameTextBox.Text = decFile.BatchName; BatchSourceTextBox.Text = decFile.BatchSource; MaterialPanel.Composition = decFile.Material; MaterialPanel.UpdateFields(); CreationTimePicker.Value = decFile.CreationDate; ModificationDatePicker.Value = decFile.ModificationDate; } else { MessageBox.Show("Error opening file!"); } }