public string[] GetPhoneNumbers(string list) { string sql = "select phone from alarm_recipient where list='" + list + "' order by call_order"; var tbl = m_server.Table("alarm_recipient", sql); return(DataTableUtility.Strings(tbl, "", "phone")); }
private string[] GetDistinct(string colName) { string sql = "Select Distinct [" + colName + "] from [" + TableName + "]"; DataTable tbl = db.Table(TableName, sql); return(DataTableUtility.Strings(tbl, "", colName)); }
/// <summary> /// Refresh the chart from data in the specified soil. /// </summary> public void Populate(Soil Soil, string ChartType, bool ShowSW = false) { DataTable Table = new DataTable(); if (ChartType == "Water") { DataTableUtility.AddColumn(Table, "DepthMidPoints (mm)", Soil.ToMidPoints(Soil.Water.Thickness)); DataTableUtility.AddColumn(Table, "Airdry (mm/mm)", Soil.Water.AirDry); DataTableUtility.AddColumn(Table, "LL15 (mm/mm)", Soil.Water.LL15); DataTableUtility.AddColumn(Table, "DUL (mm/mm)", Soil.Water.DUL); DataTableUtility.AddColumn(Table, "SAT (mm/mm)", Soil.Water.SAT); if (ShowSW) { DataTableUtility.AddColumn(Table, "SW (mm/mm)", Soil.SW); } foreach (string CropName in Soil.CropNames) { double[] PAWCmm = MathUtility.Multiply(Soil.PAWCCrop(CropName), Soil.Thickness); string LegendTitle = CropName + " LL (PAWC: " + MathUtility.Sum(PAWCmm).ToString("f0") + "mm)"; DataTableUtility.AddColumn(Table, LegendTitle, Soil.Crop(CropName).LL); } } else if (ChartType == "SoilOrganicMatter") { DataTableUtility.AddColumn(Table, "DepthMidPoints (mm)", Soil.ToMidPoints(Soil.SoilOrganicMatter.Thickness)); DataTableUtility.AddColumn(Table, "InertC (kg/ha)", Soil.SoilOrganicMatter.InertC(Soil)); DataTableUtility.AddColumn(Table, "BiomC (kg/ha)", Soil.SoilOrganicMatter.BiomC(Soil)); DataTableUtility.AddColumn(Table, "HumC (kg/ha)", Soil.SoilOrganicMatter.HumC(Soil)); } Populate(Table, ChartType, Soil); }
public static string[] GetNames() { var tbl = ExcelUtility.Read(xlsFileName(), "ControlPoints"); tbl = DataTableUtility.Select(tbl, " Enabled = true", ""); return(DataTableUtility.Strings(tbl, "", "Name")); }
/// <summary> /// Extracts DateTime[] used for label positions /// </summary> /// <param name="curveName"></param> /// <returns>list of dates using year 2000</returns> public static DateTime[] GetVariableForecastLabelDates(string curveName) { var rval = new List <DateTime>(); // var tbl = ExcelUtility.Read(xlsFileName(), "VariableForecastLevels"); var csv = new CsvFile(LookupFile("VariableForecastLevels")); var tbl = DataTableUtility.Select(csv, " RuleCurve = '" + curveName + "'", ""); //stored in excel as single string for example: /// 6/15,5/15,5/15,4/15,4/15, 3/15, 2/15, 1/15 if (tbl.Rows.Count > 0) { var s = tbl.Rows[0][2].ToString(); var tokens = s.Split(','); for (int i = 0; i < tokens.Length; i++) { var x = tokens[i].Split('/'); if (x.Length != 2) { break; } int m, d; if (int.TryParse(x[0], out m) && int.TryParse(x[1], out d)) { rval.Add(new DateTime(2000, m, d)); } } } return(rval.ToArray()); }
/// <summary> /// given a MODSIM output column name (in the access database) /// returns what table to read in modsim. /// </summary> private string ModsimTableName(string columnName) { string tableName; if (columnName == "Hydro_State_Res") { return(tableName = "RESOutput"); } if (columnName == "Hydro_State_Dem") { return(tableName = "DemOutput"); } if (m_outputTablesInfo == null) { m_outputTablesInfo = AccessDB.ReadTable(m_databaseName, "OutputTablesInfo"); } string sql = "OutputName = '" + columnName + "'"; DataTable tbl1 = DataTableUtility.Select(m_outputTablesInfo, sql, ""); if (tbl1.Rows.Count == 0) { throw new Exception("Error: A column named '" + columnName + "' could not be found in the modsim output file: " + this.m_databaseName); } tableName = tbl1.Rows[0]["Object"].ToString(); Console.WriteLine(tableName); Logger.WriteLine("tableName = " + tableName); return(tableName); }
public static string[] GetNames() { DataTable tbl = new CsvFile(LookupFile("ControlPoints")); tbl = DataTableUtility.Select(tbl, " Enabled = true", ""); return(DataTableUtility.Strings(tbl, "", "Name")); }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["Name"] != null) { string FileName = Path.GetFileName(Request.QueryString["Name"]); Response.Clear(); Response.AppendHeader("Content-Disposition", "inline; filename=" + FileName + ".csv"); //Response.AppendHeader("Content-Disposition", "csv; Soils.csv"); Response.Buffer = false; Response.ContentType = "application/vnd.ms-excel"; // text/plain string SoilName = Request.QueryString["Name"]; ApsoilWeb.Service SoilsDB = new Apsoil.ApsoilWeb.Service(); Soil Soil = Soil.Create(SoilsDB.SoilXML(SoilName)); DataTable Data = new DataTable(); SoilDataTable.SoilToTable(Soil, Data); Response.Write(DataTableUtility.DataTableToCSV(Data, 0)); Response.Flush(); // send our content to the client browser. Response.SuppressContent = true; // stops .net from writing it's stuff. } }
public string[] GetEmailList(string list) { string sql = "select email from alarm_recipient where list='" + list + "' order by call_order"; var tbl = m_server.Table("alarm_recipient", sql); return(DataTableUtility.Strings(tbl, "", "email")); }
internal static System.Data.DataTable ControlPointTableFromName(string text, string lookupColumnName) { var tbl = ExcelUtility.Read(xlsFileName(), "ControlPoints"); tbl = DataTableUtility.Select(tbl, lookupColumnName + " = '" + text + "'", ""); return(tbl); }
public void ConvertSoilToDataTable() { Soil Soil = new Soil(); Soil.ApsoilNumber = "100"; Soil.Water.Thickness = new double[] { 150.00, 150.00, 300.00, 300.00, 300.00 }; Soil.Water.BD = new double[] { 1.02, 1.03, 1.02, 1.02, 1.06 }; Soil.Water.BDMetadata = new string[] { "Field measured and checked for sensibility", "Laboratory measured", "", "", "" }; Soil.Water.AirDry = new double[] { 0.15, 0.26, 0.29, 0.29, 0.30 }; Soil.Water.LL15 = new double[] { 0.29, 0.29, 0.29, 0.29, 0.30 }; Soil.Water.DUL = new double[] { 0.54, 0.53, 0.54, 0.54, 0.52 }; Soil.Water.SAT = new double[] { 0.59, 0.58, 0.59, 0.58, 0.57 }; Soil.Water.Crops.Add(new SoilCrop() { Name = "Barley", Thickness = new double[] { 100.00, 100.00 }, LL = new double[] { 0.29, 0.25 }, KL = new double[] { 0.10, 0.08 }, XF = new double[] { 1.00, 1.00 } }); Soil.Water.Crops.Add(new SoilCrop() { Name = "Chickpea", Thickness = new double[] { 100.00, 100.00, 100.00, 100.00, 100.00, 100.00, 100.00, 100.00 }, LL = new double[] { 0.29, 0.29, 0.36, 0.43, 0.51, 0.50, 0.50, 0.48 }, KL = new double[] { 0.10, 0.10, 0.08, 0.06, 0.04, 0.02, 0.01, 0.00 }, XF = new double[] { 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 0.00 } }); Soil.SoilOrganicMatter.Thickness = new double[] { 200.000, 200.00 }; Soil.SoilOrganicMatter.OC = new double[] { 1.040, 0.89 }; Soil.SoilOrganicMatter.FBiom = new double[] { 0.025, 0.02 }; Soil.SoilOrganicMatter.FInert = new double[] { 0.400, 0.89 }; Soil.InitialWater = new InitialWater(); Soil.InitialWater.SetSW(0.5, InitialWater.PercentMethodEnum.FilledFromTop); Soil.SoilWater = new SoilWater(); Soil.SoilWater.SummerCona = 3.5; Soil.SoilWater.WinterCona = 3.5; Soil.Analysis.Thickness = new double[] { 100, 100, 100 }; Soil.Analysis.EC = new double[] { 1.7, double.NaN, double.NaN }; DataTable Table = new DataTable(); SoilDataTable.SoilToTable(Soil, Table); Assert.AreEqual(DataTableUtility.GetColumnAsDoubles(Table, "Thickness (mm)"), Soil.Water.Thickness, 1); Assert.AreEqual(DataTableUtility.GetColumnAsDoubles(Table, "BD (g/cc)"), Soil.Water.BD, 0.01); Assert.AreEqual(DataTableUtility.GetColumnAsStrings(Table, "BDCode")[0], "FM"); Assert.AreEqual(DataTableUtility.GetColumnAsStrings(Table, "BDCode")[1], "LM"); Assert.AreEqual(DataTableUtility.GetColumnAsDoubles(Table, "Chickpea ll (mm/mm)"), new double[] { 0.29, 0.29, 0.36, 0.43, 0.51, 0.50, 0.50, 0.48 }, 0.01); Assert.AreEqual(DataTableUtility.GetColumnAsDoubles(Table, "Chickpea xf (0-1)"), new double[] { 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 0.00 }, 0.01); }
public string[] ValidationList() { string sql = "select validation ||' ' ||cmmnt as item from hdb_validation " // where validation in ('A','F','L','H','P','T','V') " + "UNION SELECT ' <<null>>' from dual "; DataTable tbl = m_server.Table("validation", sql); return(DataTableUtility.StringList(tbl, "", "item").ToArray()); }
private static void AddSitesToDecodes(string serverIP, DataTable tbl) { var siteFilter = String.Join(",", DataTableUtility.Strings(tbl, "", "cbtt")); siteFilter = siteFilter.ToUpper(); McfToDecodes.Import(serverIP, "hydromet_decodes", siteFilter, "owrd"); }
internal static System.Data.DataTable ControlPointTableFromName(string text, string lookupColumnName) { // var tbl = ExcelUtility.Read(xlsFileName(), "ControlPoints"); DataTable tbl = new CsvFile(LookupFile("ControlPoints"), CsvFile.FieldTypes.AllText); tbl = DataTableUtility.Select(tbl, lookupColumnName + " = '" + text + "'", ""); return(tbl); }
/// <summary> /// Set a column of string values in the specified table. /// </summary> private static void SetStringValues(DataTable Table, string ColumnName, string[] Values, int StartRow) { if (MathUtility.ValuesInArray(Values)) { DataTableUtility.AddColumn(Table, ColumnName, Values, StartRow, Values.Length); } else if (!Table.Columns.Contains(ColumnName)) { Table.Columns.Add(ColumnName, typeof(string)); } }
public async Task <IActionResult> GetTransactionsNewCurrency(DataTableUtility dataTable) { string searchSku = dataTable.GetParameterInCustomSearchByName("sku"); IEnumerable <TransactionModel> transactions = await transactionRepository.TryGetAllTransactions(new TransactionModel { Sku = searchSku, Currency = "EUR" }); IEnumerable <TransactionModel> returnData = transactions .WhereIf(!searchSku.IsNullOrEmpty(), x => x.Sku.ToLower() == searchSku.ToLower()); return(Ok(dataTable.GetPropertiesDataTable(returnData))); }
static private double[] GetDoubleValues(DataTable Table, string FieldName, int NumValues, int Row, int DecPlaces) { // Get string value from specified table for specified field. if (Table.Columns.IndexOf(FieldName) != -1) { return(MathUtility.Round(DataTableUtility.GetColumnAsDoubles(Table, FieldName, NumValues, Row), DecPlaces)); } else { return(new double[0]); } }
/// <summary> /// Return an array of values for the specified column. /// </summary> private static string[] GetStringValues(DataTable Table, string VariableName, int NumRows, int StartRow) { if (Table.Columns.Contains(VariableName)) { string[] Values = DataTableUtility.GetColumnAsStrings(Table, VariableName, NumRows, StartRow); if (MathUtility.ValuesInArray(Values)) { return(Values); } } return(null); }
private void PopulateSeries(Series RainfallBar, DataTable Data, string ColumnName) { RainfallBar.Clear(); if (Data.Columns.IndexOf(ColumnName) != -1 && Data.Rows.Count > 0 && !Convert.IsDBNull(Data.Rows[0][ColumnName])) { for (int Row = 0; Row <= Data.Rows.Count - 1; Row++) { DateTime D = DataTableUtility.GetDateFromRow(Data.Rows[Row]); RainfallBar.Add(D, Convert.ToDouble(Data.Rows[Row][ColumnName])); } } }
/// <summary> /// Refresh this report. This method will create a worker thread to animate the graphs. /// </summary> public override void OnRefresh() { // Refresh the base report. base.OnRefresh(); // Make sure play is selected by default. OnPlayClick(null, null); Quit = false; Forward = true; // Find our ApsimFile.Component class. We'll need this to get the XML we're // working with and to find all DateFilter components underneath this report. OurComponent = Controller.ApsimData.Find(NodePath); // Go create a DataProcessor object. We'll need this to find some data later. Doc = new XmlDocument(); Doc.LoadXml(OurComponent.FullXMLNoShortCuts()); DataProcessor Processor = new DataProcessor(); List <string> DefaultFileNames = new List <string>(); UIUtility.OutputFileUtility.GetOutputFiles(Controller, Controller.Selection, DefaultFileNames); Processor.DefaultOutputFileNames = DefaultFileNames; // Now go and try to find some data. We need data so that we can determine the // start and end period for the animation. DataTable PlotData = null; foreach (XmlNode Child in Doc.DocumentElement.ChildNodes) { PlotData = Processor.Go(Child, ""); if (PlotData != null) { break; } } // If some data was found then work out the start and end date periods, locate // all child DataFilter nodes, and create a worker thread for the animation. if (PlotData != null && PlotData.Rows.Count > 0) { StartDate = DataTableUtility.GetDateFromRow(PlotData.Rows[0]); EndDate = DataTableUtility.GetDateFromRow(PlotData.Rows[PlotData.Rows.Count - 1]); Period = EndDate - StartDate; CurrentDate = StartDate; // Go find all DateFilter components - we'll need them later. DateFilterNodes = new List <ApsimFile.Component>(); FindAllRecursively(OurComponent, "DateFilter", ref DateFilterNodes); WorkerThread = new Thread(DoAnimation); WorkerThread.Start(); } }
static private string[] GetStringValues(DataTable Table, string FieldName, int NumValues, int Row) { // Get string value from specified table for specified field. if (Table.Columns.IndexOf(FieldName) != -1) { return(DataTableUtility.GetColumnAsStrings(Table, FieldName, NumValues, Row)); } else { return(new string[0]); } }
private void PopulateSeries(Series RainfallBar, DataView Data, string ColumnName) { RainfallBar.Clear(); if (Data.Table.Columns.IndexOf(ColumnName) != -1) { for (int Row = 0; Row <= Data.Count - 1; Row++) { DateTime D = DataTableUtility.GetDateFromRow(Data[Row].Row); RainfallBar.Add(D, Convert.ToDouble(Data[Row][ColumnName])); } } }
public static object[,] fUtilityDataTablesGetFields(string handle) { var table = PersistentObjects.GetFromMap <DataTable>(handle, "DATATABLE"); var fields = DataTableUtility.GetFields(table); var output = new object[fields.Count, 1]; for (int i = 0; i < fields.Count; i++) { output[i, 0] = fields[i]; } return(output); }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string res = ""; string type = ""; if (context.Request.Params["type"] != null) { type = context.Request.Params["type"]; } if (type == "client") { string cid = ""; if (context.Request.Params["cid"] != null) { cid = context.Request.Params["cid"]; } HYCashierDAL.CahierMgrDAL dal = new HYCashierDAL.CahierMgrDAL(); DataTable dt = dal.GetClient(cid); if (dt != null && dt.Rows.Count > 0) { IList <ClientInfoEntiy> clients = DataTableUtility.ToList <ClientInfoEntiy>(dt); res = JsonConvert.SerializeObject(clients); } } else if (type == "shop") { HYCashierDAL.CahierMgrDAL dal = new HYCashierDAL.CahierMgrDAL(); DataTable dt = dal.GetAllOpr(""); if (dt != null && dt.Rows.Count > 0) { IList <ClientInfoEntiy> clients = DataTableUtility.ToList <ClientInfoEntiy>(dt); res = JsonConvert.SerializeObject(clients); } } else if (type == "agent") { HYCashierDAL.CahierMgrDAL dal = new HYCashierDAL.CahierMgrDAL(); DataTable dt = dal.GetAllOpr(""); if (dt != null && dt.Rows.Count > 0) { IList <ClientInfoEntiy> clients = DataTableUtility.ToList <ClientInfoEntiy>(dt); res = JsonConvert.SerializeObject(clients); } } context.Response.Write(res); }
/// <summary> /// We need to trap the end of an edit and write the data back to the /// table. /// </summary> protected override void OnCellValueChanged(DataGridViewCellEventArgs e) { base.OnCellValueChanged(e); if (DataSourceTable != null && !InRefresh && e.RowIndex != -1 && e.ColumnIndex != -1) { try { int Col = e.ColumnIndex; int Row = e.RowIndex; if (Row > DataSourceTable.Rows.Count - 1) { DataSourceTable.Rows.Add(DataSourceTable.NewRow()); } // Make sure this row has our popup menu. if (Rows[e.RowIndex].ContextMenuStrip == null) { Rows[e.RowIndex].ContextMenuStrip = PopupMenu; } ContextMenuStrip = PopupMenu; if (DataSourceTable.Columns[Col].DataType == typeof(double) && !MathUtility.IsNumerical(Rows[Row].Cells[Col].Value.ToString())) { // Turn the column into a string column. // Capture state of existing column and remove it from DataTable. string ColumnName = DataSourceTable.Columns[Col].ColumnName; string[] Values = GridUtility.GetColumnAsStringsUsingCellFormat(this, Col); int Ordinal = DataSourceTable.Columns[Col].Ordinal; DataSourceTable.Columns.RemoveAt(Col); // Create a new column of string type. DataColumn NewColumn = DataSourceTable.Columns.Add(ColumnName, typeof(string)); NewColumn.SetOrdinal(Ordinal); DataTableUtility.AddColumn(DataSourceTable, ColumnName, Values); } DataSourceTable.Rows[Row][Col] = Rows[Row].Cells[Col].Value; ChangedColumnNames.Add(DataSourceTable.Columns[Col].ColumnName); if (TableColumnChangedEvent != null) { TableColumnChangedEvent.Invoke(ChangedColumnNames); } ChangedColumnNames.Clear(); } catch (Exception) { } // This can happen when the user puts a text value into a numeric column. } }
public override void OnSave() { FactorTargets.OnSave(); XmlDocument doc = new XmlDocument(); doc.LoadXml(FactorTargets.GetData()); Data.InnerXml = doc.DocumentElement.InnerXml; if (Table != null) { XmlNode variablesNode = Data.SelectSingleNode("//vars"); if (variablesNode == null) { variablesNode = Data.AppendChild(Data.OwnerDocument.CreateElement("vars")); } variablesNode.RemoveAll(); if (Table.Rows.Count >= 10000) { string[] values = DataTableUtility.GetColumnAsStrings(Table, Table.Columns[0].ColumnName); string csvValue = ""; foreach (string value in values) { if (value != "") { if (csvValue != "") { csvValue += ","; } csvValue += value; } else { break; } } XmlNode varNode = variablesNode.AppendChild(Data.OwnerDocument.CreateElement(Table.Columns[0].ColumnName)); varNode.InnerText = csvValue; } else { foreach (DataRow row in Table.Rows) { if ((bool)row[0]) { XmlNode varNode = variablesNode.AppendChild(Data.OwnerDocument.CreateElement(row[1].ToString())); varNode.InnerText = row[3].ToString(); } } } } }
public override void OnRefresh() { ContentsBox.Text = ""; string FullFileName = Controller.ToAbsolute(FileName); if (File.Exists(FullFileName)) { APSIMInputFile Metfile = new APSIMInputFile(); Metfile.Open(FullFileName); MetData = Metfile.ToTable(); Metfile.Close(); MetData.TableName = "Met"; // Get latitude for later on. if (Metfile.Constant("latitude") == null) { MessageBox.Show("A value for latitude was expected, but could not be found in this file.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); Latitude = Double.NaN; } else { Latitude = Convert.ToDouble(Metfile.Constant("latitude").Value, new System.Globalization.CultureInfo("en-US")); } StartDate = DataTableUtility.GetDateFromRow(MetData.Rows[0]); EndDate = DataTableUtility.GetDateFromRow(MetData.Rows[MetData.Rows.Count - 1]); PopulateRawData(); YearStartBox.ValueChanged -= YearStartBoxChanged; NumYearsBox.ValueChanged -= NumYearsBoxChanged; YearStartBox.Value = StartDate.Year; NumYearsBox.Value = 1; if (NumYears != 0) { NumYearsBox.Value = NumYears; } if (YearStart != 0) { YearStartBox.Value = YearStart; } YearStartBox.ValueChanged += YearStartBoxChanged; NumYearsBox.ValueChanged += NumYearsBoxChanged; RefreshAllCharts(); } YearPanel.Visible = (TabControl.SelectedIndex != 0); YearPanel.Parent = this; YearPanel.Top = TabControl.SelectedTab.Top + 2; YearPanel.BringToFront(); }
public override void OnRefresh() { base.OnRefresh(); AllowCheckedEvent = false; // get a list of all possible dates from datasource DataProcessor Processor = new DataProcessor(); List <string> DefaultFileNames = new List <string>(); UIUtility.OutputFileUtility.GetOutputFiles(Controller, Controller.Selection, DefaultFileNames); Processor.DefaultOutputFileNames = DefaultFileNames; XmlDocument Doc = new XmlDocument(); Doc.LoadXml(Controller.ApsimData.Find(NodePath).FullXML()); DataTable DepthData = Processor.GoFindChildDataTable(Doc.DocumentElement); // get a list of currently selected dates. List <string> SelectedDates = XmlHelper.Values(Data, "Date"); // Convert all dd/mm/yyyy dates in XML to date strings formatted according to current // locale. for (int i = 0; i < SelectedDates.Count; i++) { try { DateTime d = DateTime.ParseExact(SelectedDates[i], "d/M/yyyy", null); SelectedDates[i] = d.ToShortDateString(); } catch (Exception) { SelectedDates[i] = ""; } } DateList.Items.Clear(); if (DepthData != null) { List <string> DateStrings = DataTableUtility.GetDistinctValues(DepthData, "Date"); foreach (string DateString in DateStrings) { string St = DateString.Substring(0, DateString.IndexOf(' ')); int Indx = DateList.Items.Add(St); bool IsSelected = SelectedDates.IndexOf(St) != -1; DateList.SetItemChecked(Indx, IsSelected); } } AllowCheckedEvent = true; }
private static void AddCropColumn(DataTable Data, string CropName, Soil MySoil, int Row, int NumLayers) { if (MySoil.CropExists(CropName)) { DataTableUtility.AddColumn(Data, "ll(" + CropName + ")", MySoil.LL(CropName), Row, NumLayers); DataTableUtility.AddColumn(Data, "kl(" + CropName + ")", MySoil.KL(CropName), Row, NumLayers); DataTableUtility.AddColumn(Data, "xf(" + CropName + ")", MySoil.XF(CropName), Row, NumLayers); } else { DataTableUtility.AddValue(Data, "ll(" + CropName + ")", MathUtility.MissingValue, Row, NumLayers); DataTableUtility.AddValue(Data, "kl(" + CropName + ")", MathUtility.MissingValue, Row, NumLayers); DataTableUtility.AddValue(Data, "xf(" + CropName + ")", MathUtility.MissingValue, Row, NumLayers); } }
/// <summary> /// Populate the graph. /// </summary> private void PopulateGraph() { DataTable Table = new DataTable(); Table.TableName = "InitWater"; DataTableUtility.AddColumn(Table, "DepthMidPoints (mm)", Soil.ToMidPoints(Soil.Water.Thickness)); DataTableUtility.AddColumn(Table, "SW (mm/mm)", Soil.SWAtWaterThickness); DataTableUtility.AddColumn(Table, "AirDry (mm/mm)", Soil.Water.AirDry); DataTableUtility.AddColumn(Table, "LL15 (mm/mm)", Soil.Water.LL15); DataTableUtility.AddColumn(Table, "DUL (mm/mm)", Soil.Water.DUL); DataTableUtility.AddColumn(Table, "SAT (mm/mm)", Soil.Water.SAT); SoilGraph.AddDataSource(Table); SoilGraph.Populate(Table, "InitWater", Soil); }