public ColumnSqlServer(IContainer pTableOrView, AdoTemplate template, string columnName, DataRow columnValues)
        {
            tableOrView     = pTableOrView;
            this.template   = template;
            this.columnName = columnName;
            this.columnValuesFromInformationSchema = columnValues;

            ParameterBuilder defaultParameterBuilder = getBuilderWithDefaultValues();

            DataTable dt = template.DataTableOlustur(SQL_COLUMN_VALUES_FROM_SYS, defaultParameterBuilder.GetParameterArray());

            columnValuesFromSysViews = dt.Rows[0];
        }
Exemplo n.º 2
0
        public static DataTable MusteriSorgulaHepsiniGetir
        (

            AdoTemplate template
        )
        {
            ParameterBuilder builder = template.getParameterBuilder();

            SqlCommand cmd = new SqlCommand();

            cmd.CommandText = "ORNEKLER.MUSTERI_SORGULA_HEPSINI_GETIR";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddRange(builder.GetParameterArray());
            DataTable _tmpDataTable = template.DataTableOlustur(cmd);

            return(_tmpDataTable);
        }
Exemplo n.º 3
0
        public string GetSysdiagramsInserts(string connectionString)
        {
            string sonuc = "";

            connectionString = ConnectionHelper.RemoveProviderFromConnectionString(connectionString);
            AdoTemplate template = new AdoTemplate();
            DataTable   dt       = template.DataTableOlustur(sysdiagrams_SELECT);

            StringBuilder sb = new StringBuilder();

            foreach (DataRow row in dt.Rows)
            {
                byte[] icerik = (byte[])row[4];
                // TODO burayı düzelt
                //sb.AppendFormat(sysdiagrams_ONE_ROW, row[0], row[1], row[2], row[3], icerik.ByteArrayToString());
            }
            sonuc = String.Format(sysdiagrams_MAIN_INSERT, sb.ToString());
            return(sonuc);
        }
Exemplo n.º 4
0
        public static DataTable MusteriSorgulaMusteriKeyIle
        (

            Guid? @MusteriKey
            , AdoTemplate template
        )
        {
            ParameterBuilder builder = template.getParameterBuilder();

            builder.parameterEkle("@MusteriKey", DbType.Guid, @MusteriKey);
            SqlCommand cmd = new SqlCommand();

            cmd.CommandText = "ORNEKLER.MUSTERI_SORGULA_MUSTERI_KEY_ILE";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddRange(builder.GetParameterArray());
            DataTable _tmpDataTable = template.DataTableOlustur(cmd);

            return(_tmpDataTable);
        }
        static void Main(string[] args)
        {
            Aciklama a = new Aciklama();

            a.AciklamaKey      = Guid.NewGuid();
            a.AciklamaProperty = "Deneme";

            AciklamaBs wrapper = new AciklamaBs();

            wrapper.Ekle(a);


            AdoTemplate template = new AdoTemplate();
            DataTable   dt       = template.DataTableOlustur("SELECT * FROM ORNEKLER.ACIKLAMA");



            //AciklamaBsWrapper wrapper = new AciklamaBsWrapper();
            //Aciklama a = new Aciklama();
            //a.AciklamaKey = Guid.NewGuid();
            //a.AciklamaProperty = "Deneme Atilladan";
            //wrapper.Ekle(a);
        }