コード例 #1
0
        private void SetComboBoxes()
        {
            objAttribute_Db_Table_Field = BusinessLayer <Attribute_Db_Table_Field> .ReturnCurrentTypeObject(bnsAttribute_Db_Table_Field);

            this.BindCmbAttribute();

            Support_Classes.Attribute tmpAttribute = Attribute_BL.GetAttribute(objAttribute_Db_Table_Field.Attribute_Id);

            idx = cmbAttribute.FindString(tmpAttribute.Attribute_Name);
            cmbAttribute.SelectedIndex = idx;

            this.BindCmbDatabases();

            String dbObject = Business_Layer.BusinessLayer <Attribute_Db_Table_Field> .TrimDatabaseObjectDelimiters(objAttribute_Db_Table_Field.Attribute_Db);

            idx = cmbDatabases.FindString(dbObject);
            cmbDatabases.SelectedIndex = idx;

            this.BindCmbTables();

            dbObject = Business_Layer.BusinessLayer <Attribute_Db_Table_Field> .TrimDatabaseObjectDelimiters(objAttribute_Db_Table_Field.Attribute_Table);

            idx = cmbTables.FindString(dbObject);
            cmbTables.SelectedIndex = idx;

            return;
        }
コード例 #2
0
        public static Boolean InsertAttribute(LogicalTree.Support_Classes.Attribute objAttribute)
        {
            bool insertSuccessful = false;

            insertSuccessful = Attribute_DL.InsertAttributeRecord(objAttribute);
            return(insertSuccessful);
        }
コード例 #3
0
        public static Boolean InsertAttributeRecord(LogicalTree.Support_Classes.Attribute objAttribute)
        {
            bool insertSuccessful = false;

            if (objAttribute == (LogicalTree.Support_Classes.Attribute)null)
            {
                return(insertSuccessful);
            }

            string insertString = "INSERT INTO dbo.tblAttribute (attribute_name) VALUES ('{0}')";

            insertString = string.Format(insertString, objAttribute.Attribute_Name, objAttribute.Application_Name);

            insertSuccessful = Data_Layer.InsertTypeRecord(insertString, Data_Layer.ltConnectionString);

            return(insertSuccessful);
        }