C# Image Creator (Csharp Resim Oluşturucu)

C# Image Creator (Csharp Resim Oluşturucu)

19. July 2009

Read this article in your language IT | EN | DE | ES

Merhaba Arkadaşlar  tekrar yeni  bir örnek projeyle sizlerle beraberim  bu projemde c#  alt yapısını  kullanarak

resimi database nasıl  kayıt ederiz ve bu  resmi  rekrar nasıl  gösteririz onu  onu  görelim  fazla uzatmadan  projede gerekli olucak

maddeleri yazalım örnek bir  database yapımız var  olarak

Database    yapımızı oluşturmak için  gerekli  kodumuzu yazalım  

Proje  örnek oluşumu :

 

Kaynak  kodu sayfanın en alt köseşinden  ulaşabilirsniz  :

 

Databasae Adı :

Create Database Resim 

Use

 

Tablo Adı:

Create Table Resimler

(

@ResimId int Identity (1,1) not null,

ResimAd nvarchar  (100) not null ,

ResimYol  Image  not null

Primary key (ResimId)

)

Buda Procedure Oluşumu 

Create Proc [ResimEkle]

(

Ad nvarchar(100),

Resim image

)

as 

insert into resimler(ResimAd,ResimYol)
values(@Ad,@Resim)

Create proc [HepsiniGetir]

As 

Select * from Resimler

Database tarafında olan işlemlerimiz bu kadar  şimdi VS 2008  Tarafından  gerekli olan kodlarımızı  yazıyoruz 

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.IO;

namespace Resim
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        string resimyolu;
        private void btnsec_Click(object sender, EventArgs e)
        {
            if (Opfd.ShowDialog() == DialogResult.OK)
            {
                PbResim.Image = Image.FromFile(Opfd.FileName);
                resimyolu = Opfd.FileName;
            }

        }

        private void btnekle_Click(object sender, EventArgs e)
        {


            FileStream fs = new FileStream(resimyolu, FileMode.Open, FileAccess.Read);

            BinaryReader br = new BinaryReader(fs);

            byte[] resim = br.ReadBytes((int)fs.Length);

            br.Close();
            fs.Close();

            SqlConnection con = new SqlConnection("server=.;database=Resim;trusted_connection=true");
            SqlCommand cmd = new SqlCommand("ResimEkle", con);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@Ad", txtyaz.Text);
            cmd.Parameters.AddWithValue("@Resim", resim);

            con.Open();

            cmd.ExecuteNonQuery();

            con.Close();


            if (resim == null)
            {
                MessageBox.Show("Resim Eklenmedi");
            }

            else
            {
                MessageBox.Show("Resim Eklendi");
            }


            Clear();
        }
        SqlConnection con;
        SqlDataAdapter da;
        DataTable dt;
        private void btngetir_Click(object sender, EventArgs e)
        {
            con = new SqlConnection("Server=.;database=Resim;trusted_connection=true");

            da = new SqlDataAdapter("HepsiniGeitr", con);

            DataTable dt = new DataTable();

            da.Fill(dt);

            dataGridView1.DataSource = dt;
        }

        void Clear()
        {

            foreach (Control ctr in this.Controls)
            {
                if (ctr is TextBox)

                    (ctr as TextBox).Clear();
            }

        }

        private void btnguncel_Click(object sender, EventArgs e)
        {

            SqlCommandBuilder cb = new SqlCommandBuilder(da);
            da.Update(dt);

        }

    }
}


Source Code   Resim.rar (38,81 kb)

Evet arkadaş bir örnek projenin  sonuna daha gelmiş

olduk yeni bir projede görüşmek üzere herkeze iyi calışmalar 

 Saygılarımla Orhan Türk 

 

FacebookDigg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

C# , Tüm Projelerim

Comments

1/2/2010 6:08:41 AM #
Thank you for your help!
1/2/2010 6:32:54 PM #
I would like to thank
1/4/2010 11:15:31 AM #
thanks!  very helpful post!! like the template btw ;)
Aykut
Aykut
3/13/2010 4:41:26 PM #
Orhan Selamlar,

Paylaşmış olduğun örnek için teşekkürler fakat acıkcası ben işin database kısmını anlıyamadım acaba gercek zamanlı olusturulmus bır database ile bırlıkte bır uygulama yapıp bızımle paylasabılırmısın.

Iyı gunler.
3/14/2010 4:54:37 PM #
Hi admin, your blog's design is incredible and i like it. Your posts are so cool. Please keep them coming. Cheers.. online dressup games
3/17/2010 5:28:07 PM #
i think you have a pretty nice site here... today was my first time coming here.. i just happened to find it doing a google search. anyway, good post.. i'll be bookmarking this page for sure.
3/18/2010 3:41:08 AM #
hopefully this post doesn't appear multiple times (it seems to freeze once i try to post my comment.. not sure if it's actually posting), but all I really wanted to say was great post and thanks for sharing.
3/18/2010 5:43:28 PM #
What you wrote means a lot to me Hi I first time here C# Image Creator (Csharp Resim Oluşturucu) jumped here on your site, founde on Google. I want to thank you so much for the help and advice you have shared with me in the past. I contacted you last January about an issue I was having. Based on the advice you gave me, I thought long and hard and made the decision that was necessary for me to be happy in my life. It has been difficult, but I am now experiencing not only a new freedom, but happiness at making a decision that I knew I needed to make the whole time. It was just really great to have some validation! valsta Send me news to eldopresto@gmail.com
3/23/2010 1:57:22 AM #
I saw an article on "modern healthcare blog" as C# Image Creator (Csharp Resim Olusturucu) about health care reform.  Which says that we all know what we need. The people in power isnt listening.
3/23/2010 9:45:55 PM #
Thank you for your help!
3/24/2010 1:56:02 AM #
Nice create up…ordinarily I by no means response to these issues but this time I will, Provides Gives thanks to the critical entropy.
4/4/2010 12:22:01 PM #
Ugh.. that was strange that my comment doesnt display. At all I wanted to say that it's good to realize that someone else also exposed this as I had trouble reading the same info elsewhere. Also, fascinating post. A big part of readers don't think that every websites should have comments part. On the other hand I consider that user comments specify a blog. Shortly thank you very much for accepting us posting on this established page. Best regards.
4/7/2010 5:40:14 PM #
4/12/2010 2:25:00 PM #
Hey - nice blog, just looking around some websites, seems a really nice platform you are using. I'm currently using Wordpress for a few of my sites but looking to change one of them over to a platform similar to yours as a trial run. Anything in particular you would recommend about it?
4/16/2010 8:49:29 AM #
This allows you to not only generate traffic to your blog, but also generate targeted traffic.
4/16/2010 1:56:55 PM #
Sometimes the time comes when decisions need to be made. Many people choose to purchase Cremation Urns instead of coffins because of the price difference.One of the first choices you will make depends on who it is for there are many different types, styles and categories of Urns. Some of most common materials Cremation Urns are made of are   Copper Urns, Crystal Urns, Cultured Marble, .
4/18/2010 10:05:28 PM #
Superb post! I am only starting in advertising and striving to be able to perform it well - resources similar to this article are extremely valuable. As our company is based in the usa, it really is all a bit new to us.
4/21/2010 11:52:00 AM #
Bani pe net - Learn how to make money online
4/24/2010 5:39:03 PM #
Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me.
4/26/2010 5:59:48 AM #
Great post full of useful tips! My site is fairly new and I am also having a hard time getting my readers to leave comments. Analytics shows they are coming to the site but I have a feeling “nobody wants to be first”.
4/28/2010 3:11:28 AM #
Fantastic stuff...
<a href = "http://www.findproxy.ca">anonymous free proxy</a>&nbsp; &nbsp; <a href = "http://www.findproxy.ca">find proxy</a>
4/29/2010 4:04:43 AM #
Hi  blog im from london but im moving to USA i found this on the yahoouk search engine, I'm thinking about starting a private jets for sale blog,keep the good work up i will add you to my favoroties.
5/1/2010 5:35:50 AM #
Hi top blog im going to open a blog about tractors soon, i found some tips on the way your blog is set up thank you.
5/1/2010 6:54:55 AM #
Great post full of useful tips! My site is fairly new and I am also having a hard time getting my readers to leave comments. Analytics shows they are coming to the site but I have a feeling “nobody wants to be first”.
5/1/2010 10:13:44 PM #
In international trading like Forex trading, the most difficult part could be getting the payments. Sometimes, there are risks of delayed and worse, non-payment. Choosing the best Forex brokers would minimize this risk. Visit http://onlineforexbrokers.info for a full list with over 200 online forex brokers
5/2/2010 6:00:12 AM #
Merely want to say your article is as tonishing. The lucidity in your post is simply striking and i can take for granted you are an expert on this field. Well with your permission allow me to grab your rss feed to keep up to date with incoming post. Thanks a million and please keep up the sound work.
5/2/2010 7:38:50 PM #
Great post full of useful tips! My site is fairly new and I am also having a hard time getting my readers to leave comments. Analytics shows they are coming to the site but I have a feeling “nobody wants to be first”.
5/2/2010 9:26:32 PM #
Only want to say your article is striking. The clearness in your post is simply spectacular and i can assume you are an expert on this subject. Well with your permission allow me to grab your rss feed to keep up to date with incoming post. Thanks a million and please keep up the effective work.
5/2/2010 11:27:21 PM #
Hi  C# Image Creator (Csharp Resim Oluşturucu) one guess is that she actually met her limit of 100 and that caused the bottom portion to disappear (even though it still says there are 10 left), or there may have been an error. Hi First time hopped here on your site, founde on Bing. freestyle music Send me news to Carthew@yahoo.com
5/5/2010 5:50:09 AM #
Thanks for this great website. I am trying to read some more posts but I cant get your website to display properly in my Opera Browser. Thanks again.
5/6/2010 1:20:11 AM #
A good broker will consider interest of small amount traders and will allow you to give input - this can be subjective and all depends on the individual. Some offer trading accounts for as low as $200 dollars which is good; however caution should be exercised against scams.
5/7/2010 4:50:43 AM #
Great post full of useful tips! My site is fairly new and I am also having a hard time getting my readers to leave comments. Analytics shows they are coming to the site but I have a feeling “nobody wants to be first”.
5/7/2010 6:47:23 AM #
Great post full of useful tips! My site is fairly new and I am also having a hard time getting my readers to leave comments. Analytics shows they are coming to the site but I have a feeling “nobody wants to be first”.
5/9/2010 9:12:11 AM #
MMM...Maby considere to put here more c# image creator pic
5/13/2010 6:06:40 PM #
I'll save this as inspiration and send visitors from my blog. I have put up some new ideas too, so I will include a link to this post (if OK) on my site?
5/14/2010 9:29:27 PM #
I tried to get the feed for the RSS for this blog but it is not properly displaying in Google Chrome. Does anyone have any suggestions?
5/17/2010 12:11:57 AM #
Your posts are so cool. Please keep them coming. Cheers.. online dressup games
5/17/2010 8:42:38 PM #
I’ve gotten a lot of good information on this site. Its Definitely worth reading for future reference.
5/18/2010 4:43:56 AM #
Nice blog. Found it using Bing.  Think I'll be back to see what else you've blogged about.
5/18/2010 11:11:05 AM #
This is a really good read for me, Must admit that you are one of the best bloggers I ever saw.Thanks for posting this informative article.
5/20/2010 4:40:21 AM #
Hello from Germany! May i quote a post a translated part of your blog with a link to you? I've tried to contact you for the topic C# Image Creator (Csharp Resim Olusturucu), but i got no answer, please reply when you have a moment, thanks, Spruch
5/21/2010 3:23:36 AM #
•I am not really sure if best practices have emerged around things like that, but I am sure that your great job is clearly identified. I was wondering if you offer any subscription to your RSS feeds as I would be very interested and can?t find any link to subscribe here.
5/21/2010 11:22:04 AM #
Nice blog. Found it using Yahoo.  Think I'll be back to see what else you've blogged about.
5/21/2010 5:09:53 PM #
Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon.
5/22/2010 1:31:26 AM #
Every time I see blogs as good as this I KNOW I should stop surfing and start working on mine!
5/22/2010 10:31:44 AM #
Your parents won't give you extra money, but would they be willing to let you earn it from them? If they both work, would they pay you to cook dinner? Does the garage need cleaning, the dog need bathing, anything they don't expect you to do that you could do?Try going to the principal's office and asking if the school has any paying jobs for students. They may have a few, or they may refer you to the school's vocational office, and they may know of teen jobs in the community.
5/23/2010 2:09:06 PM #
•Resources like the one you mentioned here will be very useful to me! I will post a link to this page on my blog. I am sure my visitors will find that very useful.
5/23/2010 10:37:33 PM #
Do you mind if I use some of this website for my next video on <a href="http://www.squidoo.com/graffiticharacters" rel="follow">graffiti characters</a>? I'll email you in case you don't see this one response anyway just to be sure.
5/24/2010 6:27:56 AM #
For reasons unknown IE doesn't show this page properly...not sure as to why this is happening. Moving On, it was a really interesting read, keep up the superb work and I will return as soon as I can.
5/24/2010 1:06:48 PM #
Exceptional read, I just passed this onto a friend who was doing a little analysis on that. And he in fact bought me lunch because I found it for him.... smile.. So let me rephrase that: Thanks for lunch!But yeah Thank you for taking the time to discuss this, I feel strongly about it and really like learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me.
5/25/2010 3:04:46 AM #
One of my school mate told me about your web site yesterday.Even i like your post very much.We are currently doing an project on this particluar topic.I think we will get good marks because of your article thank you very much sir.
5/25/2010 9:39:56 AM #
I haven't visited a site this revealing in a while.  I will definately return!
5/25/2010 11:11:35 PM #
we're preparing the hiqh quality replica watches with cheap price for you  www.ddwatches.com
5/27/2010 12:35:53 AM #
How many kinds of federal student loans are there besides Perkins, Stafford and PLUS Loans? When do you apply for the loans?
5/29/2010 10:57:45 AM #
Hi,
I can't  really agree with your post but there are some good points.  I like your colors you use in your site.
5/30/2010 4:24:31 PM #
Sorry for the huge review, but I'm really loving the new Zune, and hope this, as well as the excellent reviews some other people have written, will help you decide if it's the right choice for you.
6/1/2010 12:30:10 AM #
Hi,
I wanted to subscribe to your feed and the link did not work.  I'll give it a shot tomorrow.
6/1/2010 9:48:21 AM #
i cant beleive i stumbled onto your post..thanks so much!!! i am going to have to sign up 2 ur RSS feed so i can keep updated with your post...thanks Again
6/1/2010 11:21:00 PM #
Thanks for the info, well done.
6/2/2010 5:56:08 AM #
I love streaming movies online, it is way easier than going to the theaters.
6/2/2010 12:52:31 PM #
Fascinating thoughts here. Are you convinced this is the conscientious way to look at it though? My personal experience is that everyone should pretty much live and let live because what one person surmises as just -- another person simply does not. Individuals are going to do what they want to do. In the end, they always do. The most we can wish for is to distinguish a few things here and there that hopefully, allows them to make just a little better informed decision. Otherwise, great post. You're definitely making me think! --Connor
6/2/2010 8:38:42 PM #
The topic C# Image Creator (Csharp Resim Olusturucu) is totally new for me, but it´s very interesting. I will read more about this topic and make me my own opinion. Thanks, Katy Wein
6/3/2010 1:26:15 AM #
Sehen wie ausgezeichnete Fotografien verschiedenster Objekte und Landschaften auf http://klatt-page.de/
6/3/2010 4:33:51 AM #
You lost me, buddy. I mean, I suppose I get what youre saying. I understand what you are saying, but you just seem to have forgotten that there are some other people in the world who view this issue for what it really is and may not agree with you. You may be turning away alot of people who might have been fans of your blog.
6/3/2010 12:54:53 PM #
Great post & Fantastic blog! I would definitely love to begin a blog too but I have no clue where to begin. I possess the ability to do it (not that challenging on the technical part) but I really feel like I am too lazy to post regularly. That is the problem, if you start you have to go all the way. However blogs like yours inspire me to have a go at it.
6/3/2010 4:05:11 PM #
Is there any good digital or animation technology that you can buy that looks professional and is easy? Something like what digital domain uses but not exactly, just easy and good? What kind of things does digital domain use is it animation of something else?
6/4/2010 1:01:34 PM #
You know this is a very good post i hadent thought about this for quite a while and you have like sparked me to look into it further and re educate my self in the subject....thanks,hope to see more of your posts soon
6/4/2010 8:58:11 PM #
Hmm, what about Animation of the Day Wrap Up
6/4/2010 11:26:36 PM #
You try the Lynx alpha yet? I'm wondering if I should install it, wanted to see if anybody tried it first
6/6/2010 11:25:37 AM #
Thanks for the tips… Best regards.
6/7/2010 3:30:16 AM #
Thanks for this brilliant article. I am delighted after reading this. Thank you!

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



Sayfa 0.03125 saniyede yuklendi.