Click here to Skip to main content
15,886,873 members
Home / Discussions / C#
   

C#

 
GeneralRe: when is finally?! Pin
Jeff Connelly15-Nov-10 4:38
Jeff Connelly15-Nov-10 4:38 
GeneralRe: when is finally?! Pin
Jacob D Dixon15-Nov-10 10:34
Jacob D Dixon15-Nov-10 10:34 
GeneralRe: when is finally?! Pin
Jeff Connelly15-Nov-10 10:49
Jeff Connelly15-Nov-10 10:49 
Questionpixel related question Pin
inayathussaintoori13-Nov-10 4:48
inayathussaintoori13-Nov-10 4:48 
AnswerRe: pixel related question Pin
Abhinav S13-Nov-10 7:01
Abhinav S13-Nov-10 7:01 
GeneralRe: pixel related question Pin
inayathussaintoori13-Nov-10 7:15
inayathussaintoori13-Nov-10 7:15 
QuestionPlay multiple sounds with SoundPlayer and SDK DirectSound Pin
Mc_Topaz13-Nov-10 0:57
Mc_Topaz13-Nov-10 0:57 
Questiongiving authorization to the user Pin
Erdinc2712-Nov-10 23:55
Erdinc2712-Nov-10 23:55 
hey guys..i try to make a login panel and authorization..first i created a StoredProcedure like below
ALTER proc [dbo].[sp_KullaniciYetkiDegistir]
(
	@KullaniciNo int,
	@Yetki0 int,
	@Yetki1 int,
	@Yetki2 int,
	@Yetki3 int,
	@Yetki4 int
)
As 
	Begin 
		update Izin set ErisebilirMi = @Yetki0 where KullaniciNo = @KullaniciNo and YetkiNo = 1
		update Izin set ErisebilirMi = @Yetki1 where KullaniciNo = @KullaniciNo and YetkiNo = 2
		update Izin set ErisebilirMi = @Yetki2 where KullaniciNo = @KullaniciNo and YetkiNo = 3
		update Izin set ErisebilirMi = @Yetki3 where KullaniciNo = @KullaniciNo and YetkiNo = 4
		update Izin set ErisebilirMi = @Yetki4 where KullaniciNo = @KullaniciNo and YetkiNo = 5
	End

in here i give some authority according to the KullaniciNo(here Erisebilirmi column is set as bit..so i can give or not give authority to the user)...and in my button's click i wrote like that
cmd = new SqlCommand("sp_KullaniciYetkiDegistir", conn);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@KullaniciNo", System.Data.SqlDbType.Int).Value = KullaniciNo;
                cmd.Parameters.AddWithValue("@Yetki0", System.Data.SqlDbType.Bit).Value = chkAdmin.Checked;
                cmd.Parameters.AddWithValue("@Yetki1", System.Data.SqlDbType.Bit).Value = chkKullaniciEkle.Checked;
                cmd.Parameters.AddWithValue("@Yetki2", System.Data.SqlDbType.Bit).Value = chkKullaniciSil.Checked;
                cmd.Parameters.AddWithValue("@Yetki3", System.Data.SqlDbType.Bit).Value = chkYekilendir.Checked;
                cmd.Parameters.AddWithValue("@Yetki4", System.Data.SqlDbType.Bit).Value = chkProjeGor.Checked;

                if (cmd.ExecuteNonQuery() == 1)
                    MessageBox.Show("Authorities Are Set", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                else
                    MessageBox.Show("Authorization Error", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

here cmd.ExecuteNonQuery() drops directly Else block..what is wrong here??
any help will be appreciated
AnswerRe: giving authorization to the user Pin
Eddy Vluggen13-Nov-10 9:01
professionalEddy Vluggen13-Nov-10 9:01 
GeneralRe: giving authorization to the user Pin
Erdinc2713-Nov-10 9:50
Erdinc2713-Nov-10 9:50 
GeneralRe: giving authorization to the user Pin
Eddy Vluggen13-Nov-10 11:21
professionalEddy Vluggen13-Nov-10 11:21 
QuestionSkins Pin
Anil Kumar.Arvapalli12-Nov-10 18:45
Anil Kumar.Arvapalli12-Nov-10 18:45 
AnswerRe: Skins Pin
thatraja12-Nov-10 19:11
professionalthatraja12-Nov-10 19:11 
AnswerRe: Skins Pin
Kanasz Robert13-Nov-10 6:02
professionalKanasz Robert13-Nov-10 6:02 
GeneralRe: Skins Pin
Anil Kumar.Arvapalli13-Nov-10 23:19
Anil Kumar.Arvapalli13-Nov-10 23:19 
QuestionUse Automation To Open Solution Pin
Kevin Marois12-Nov-10 11:36
professionalKevin Marois12-Nov-10 11:36 
AnswerRe: Use Automation To Open Solution Pin
Eddy Vluggen13-Nov-10 8:59
professionalEddy Vluggen13-Nov-10 8:59 
QuestionHttpWebRequest/Response check for connectivity Pin
softwarejaeger12-Nov-10 1:48
softwarejaeger12-Nov-10 1:48 
AnswerRe: HttpWebRequest/Response check for connectivity Pin
Dave Kreskowiak12-Nov-10 3:45
mveDave Kreskowiak12-Nov-10 3:45 
QuestionHow to Improve Qulity of Print Pin
Anubhava Dimri11-Nov-10 23:23
Anubhava Dimri11-Nov-10 23:23 
AnswerRe: How to Improve Qulity of Print Pin
OriginalGriff11-Nov-10 23:48
mveOriginalGriff11-Nov-10 23:48 
GeneralRe: How to Improve Qulity of Print Pin
Anubhava Dimri12-Nov-10 0:13
Anubhava Dimri12-Nov-10 0:13 
GeneralRe: How to Improve Qulity of Print Pin
Pete O'Hanlon12-Nov-10 0:37
mvePete O'Hanlon12-Nov-10 0:37 
GeneralRe: How to Improve Qulity of Print Pin
Anubhava Dimri12-Nov-10 17:21
Anubhava Dimri12-Nov-10 17:21 
GeneralRe: How to Improve Qulity of Print Pin
Pete O'Hanlon13-Nov-10 11:53
mvePete O'Hanlon13-Nov-10 11:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.