Example #1
0
        private void OKDateButton_Click(object sender, EventArgs e)
        {
            if (String.IsNullOrWhiteSpace(ToolsNameTextBox.Text))
            {
                Infinium.LightMessageBox.Show(ref TopForm, false,
                                              "Некорректное название!",
                                              "Ошибка");
                return;
            }

            string ValueParametrsDTstring;

            using (StringWriter SW = new StringWriter())
            {
                ValueParametrsDT.WriteXml(SW);
                ValueParametrsDTstring = SW.ToString();
            }

            if (IsNew)
            {
                TechStoreManager.AddTools(ToolsSubTypeID, ToolsNameTextBox.Text, ValueParametrsDTstring);
            }
            else
            {
                TechStoreManager.EditTools(ToolsID, ToolsNameTextBox.Text, ValueParametrsDTstring);
            }

            Ok = true;
            this.Close();
        }