private void SaveData()
        {
            try
            {
                unit.Name    = txtName.Text.Trim();
                unit.Enabled = checkBox1.Checked;

                string msg = string.Empty;
                if (string.IsNullOrEmpty(selectId))
                {
                    unit.Id = Guid.NewGuid();
                    PharmacyDatabaseService.AddDictionaryMeasurementUnit(out msg, unit);
                }
                else
                {
                    unit.Id = Guid.Parse(selectId);
                    PharmacyDatabaseService.SaveDictionaryMeasurementUnit(out msg, unit);
                }
                if (string.IsNullOrEmpty(msg))
                {
                    this.FormState = FormOperation.Empty;

                    RefreshDataView();
                }
                else
                {
                    MessageBox.Show(msg, "Error");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("保存数据失败!", "错误");
                Log.Error(ex);
            }
        }