public void addRowTeeth(TeethVisual3D teeth, string type)
        {
            measurement.Type = Smile.TEETH;        
            string modified_date = DateTime.Today.ToString("dd-MM-yyyy");
                
            if (type == "man")
            {
                string[] separators = { ";" };
                string[] _startpoint = teeth.Model.StartPosition.Split(separators, StringSplitOptions.RemoveEmptyEntries);
                string[] _endpoint = teeth.Model.EndPosition.Split(separators, StringSplitOptions.RemoveEmptyEntries);

                //string spoint = String.Concat(String.Format("{0:0.00}", _startpoint[0]), ";", String.Format("{0:0.00}", _startpoint[1]), ";", String.Format("{0:0.00}", _startpoint[2]));
                //string epoint = String.Concat(String.Format("{0:0.00}", _endpoint[0]), ";", String.Format("{0:0.00}", _endpoint[1]), ";", String.Format("{0:0.00}", _endpoint[2]));
                Point3D spoint = new Point3D(Math.Round(Convert.ToDouble(_startpoint[0]), 2), Math.Round(Convert.ToDouble(_startpoint[1]), 2), Math.Round(Convert.ToDouble(_startpoint[2]), 2));
                Point3D epoint = new Point3D(Math.Round(Convert.ToDouble(_endpoint[0]), 2), Math.Round(Convert.ToDouble(_endpoint[1]), 2), Math.Round(Convert.ToDouble(_endpoint[2]), 2));

                MeasurementTeeth m = new MeasurementTeeth(teeth.Id, Math.Round(teeth.Model.Length, 2), spoint.ToString(), epoint.ToString(), type, modified_date, false);

                Mantooth.Add(m);
                resultDataGridMan.ItemsSource = null;
                resultDataGridMan.ItemsSource = Mantooth;
 
                resultDataGridMan.Columns[1].IsReadOnly = false;
            }
            else
            {
                string spoint = null; string epoint = null;
                MeasurementTeeth m = new MeasurementTeeth(teeth.Id, Math.Round(teeth.Model.Length, 2), spoint, epoint, type, modified_date, false);
                Autotooth.Add(m);
                resultDataGridAuto.ItemsSource = null;
                resultDataGridAuto.ItemsSource = Autotooth;
 
           
            }
            this.Show();
            return;

        }
        private MeasurementTeeth toTeethMeasurement(IDataReader dataReader)
        {
            MeasurementTeeth p = new MeasurementTeeth();

            p.Identity = GetStringSafe(dataReader, "teethid");
            p.Length = Convert.ToDouble(GetStringSafe(dataReader, "length"));
            p.SPoint = GetStringSafe(dataReader, "Spoint");
            p.EPoint = GetStringSafe(dataReader, "EPoint");
            p.Type = GetStringSafe(dataReader, "type");
            if (GetStringSafe(dataReader, "modified").ToString() == "")
            { p.ModifiedDate = GetStringSafe(dataReader, "created".ToString()).ToString(); }
            else
            { p.ModifiedDate = GetStringSafe(dataReader, "modified").ToString(); }
            p.Loaded = true;


            return p;
        }