hi all
i update guestinfo all are update but the gender and martial status is not updated which is in comobox
here is the button code
private void button7_Click(object sender, EventArgs e)
{
guests myguest = new guests();
myguest.Guest_id = Convert.ToInt32(guest_id.Text);
myguest.First_name = first_name.Text;
myguest.Last_name = last_name.Text;
myguest.Gender_status = Convert.ToString(gender_status.SelectedValue);
myguest.Martial_status = Convert.ToString(martial_status.SelectedValue);
myguest.Phone_numb = Convert.ToInt32(phone_numb.Text);
myguest.Email_address = email_id.Text;
myguest.update();
dataGridView1.DataSource = myguest.displaydata();
MessageBox.Show("Guest Updated Successfully!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
clearfield();
}
and i also create store procedure
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[UpdateGUESTiNFO]
@guest_id int,
@First_name nvarchar(50),
@last_name nvarchar(50),
@gender nvarchar(50),
@martial_status nvarchar(50),
@phone_number int,
@email_address nvarchar(50)
as
begin
update GuestInfo
set
first_name=@First_name,Last_name=@last_name,Phone_number=@phone_number,Email_address=@email_address
where
guest_id=@guest_id
END
can anyone tell this problem