Exemplo n.º 1
0
        public DataTable ChangeUnits(DataTable dt, string Units, string WUnits)
        {
            Units objUnits = new Units();
            if (dt != null)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    DataRow dr = objUnits.GetChangedUnits(dt.Rows[i], Units, WUnits);
                    if (dt.Columns.Contains("name"))
                        dt.Rows[i]["name"] = dr["name"].ToString();
                    if (dt.Columns.Contains("trnsTag"))
                        dt.Rows[i]["trnsTag"] = dr["trnsTag"].ToString();
                    if (dt.Columns.Contains("colorPaletteName"))
                        dt.Rows[i]["colorPaletteName"] = dr["colorPaletteName"].ToString();

                }
            }
            return dt;
        }