public void CreateTemplate(DeclarationTemplate template)
        {
            var connect = string.Format("INSERT INTO Declaration" +
                                        "(ID, Name, Description, Introduction, MainText) Values" +
                                        "('{0}', '{1}', '{2}', '{3}', '{4}')",
                                        template._id, template._name, template._description, template._introduction,
                                        template._mainText);

            MethodsForDB.Create(connect);
        }
 public void DeleteTemplate(DeclarationTemplate declaration)
 {
     var connect = $"DELETE FROM Declaration WHERE ID = '{declaration._id}'";
     MethodsForDB.Delete(connect);
 }
        public DeclarationTemplate OpenDeclarTemplate(string name)
        {
            var connection = MethodsForDB.Connection;
            string query = $"Select * From LabWork WHERE Name = '{name}'";
            var command = new SqlCommand(query, connection);
            connection.Open();
            DeclarationTemplate declarationTemplate = null;
            using (var reader = command.ExecuteReader())
            {
                while (reader.Read())
                {
                    declarationTemplate = new DeclarationTemplate(reader.GetGuid(0))
                    {
                        _name = reader.GetString(1),
                        _description = reader.GetString(2),
                        _introduction = reader.GetString(3),
                        _mainText = reader.GetString(4)
                    };
                }
            }

            return declarationTemplate;
        }
 public void DeleteTemplate(DeclarationTemplate labWork)
 {
     declarationTemplate.DeleteTemplate(declarationTemplate);
 }
 public void CreateTemplate(DeclarationTemplate template)
 {
     declarationTemplate.CreateTemplate(declarationTemplate);
 }
 public ProxyTemplate()
 {
     realTemplate = new LabWorkTemplate();
     declarationTemplate = new DeclarationTemplate();
 }
 void ITemplate.DeleteTemplate(DeclarationTemplate labWork)
 {
 }
 void ITemplate.CreateTemplate(DeclarationTemplate template)
 {
 }