Click here to Skip to main content
15,891,184 members
Home / Discussions / C#
   

C#

 
AnswerRe: lock block with parameter Pin
PIEBALDconsult17-Sep-09 19:31
mvePIEBALDconsult17-Sep-09 19:31 
GeneralRe: lock block with parameter Pin
Atul Kharecha17-Sep-09 19:41
Atul Kharecha17-Sep-09 19:41 
GeneralRe: lock block with parameter Pin
OriginalGriff17-Sep-09 22:02
mveOriginalGriff17-Sep-09 22:02 
GeneralRe: lock block with parameter Pin
Atul Kharecha17-Sep-09 23:23
Atul Kharecha17-Sep-09 23:23 
GeneralRe: lock block with parameter Pin
OriginalGriff18-Sep-09 0:28
mveOriginalGriff18-Sep-09 0:28 
AnswerRe: lock block with parameter Pin
Nicholas Butler17-Sep-09 22:13
sitebuilderNicholas Butler17-Sep-09 22:13 
Questionhelp on C# EXCEL Pin
gjx_junxian198917-Sep-09 16:29
gjx_junxian198917-Sep-09 16:29 
QuestionGUID Pin
Illegal Operation17-Sep-09 14:39
Illegal Operation17-Sep-09 14:39 
Hi,

How can I pass a Guid as a Parameter? I have the following method in my DAL but I cannot pass the value as Guid and I don't know how to do the conversion. I get this error "Specialized cast in not valid".

My method looks like this:

public dsWBGT GetPersonByUserId(Guid userId)
{
    dsWBGT dsPerson = new dsWBGT();

    WBGT.DAL.dsWBGTTableAdapters.PersonTableAdapter taPerson = new WBGT.DAL.dsWBGTTableAdapters.PersonTableAdapter();
    taPerson.FillByUserId(dsPerson.Person, UserId);

    return dsPerson;
}


Basically I am using ASPNET as the membership provider and I need to retrieve the user details based on the userID.

This is my method:

public void GetPersonByUserId()
{
    frmUsers usersForm = frmUsers.GetChildInstance();

    this.dsWBGT = personDataManager.GetPersonByUserId(UserId);
    this.personBindingSource.DataSource = this.dsWBGT;
}


and finally my event looks like this:

        private void dgvUsers_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == 1)
            {
                Forms.Person.frmPerson personForm = new WBGT.Client.Forms.Person.frmPerson();

                personForm.UserId = (Guid)dgvUsers.Rows[e.RowIndex].Cells[0].FormattedValue;
THIS IS WHERE IT FAILS :((
                personForm.GetPersonByUserId();

                personForm.MdiParent = frmMain.ActiveForm;
                personForm.Show();
                personForm.BringToFront();
            }
        }


Thank you!

Illegal Operation

AnswerRe: GUID Pin
PIEBALDconsult17-Sep-09 14:42
mvePIEBALDconsult17-Sep-09 14:42 
GeneralRe: GUID Pin
Illegal Operation17-Sep-09 17:13
Illegal Operation17-Sep-09 17:13 
GeneralRe: GUID Pin
PIEBALDconsult17-Sep-09 19:13
mvePIEBALDconsult17-Sep-09 19:13 
QuestionCopy transparent image to Photoshop Pin
Winkles17-Sep-09 13:04
Winkles17-Sep-09 13:04 
AnswerRe: Copy transparent image to Photoshop Pin
Henry Minute17-Sep-09 14:01
Henry Minute17-Sep-09 14:01 
GeneralRe: Copy transparent image to Photoshop Pin
Winkles17-Sep-09 18:03
Winkles17-Sep-09 18:03 
GeneralRe: Copy transparent image to Photoshop Pin
Henry Minute18-Sep-09 1:05
Henry Minute18-Sep-09 1:05 
QuestionCrystal Reports or RDLC Pin
Jassim Rahma17-Sep-09 11:38
Jassim Rahma17-Sep-09 11:38 
AnswerRe: Crystal Reports or RDLC Pin
egenis17-Sep-09 20:24
egenis17-Sep-09 20:24 
Questionc# back up program ? :S Pin
booo2222222222222217-Sep-09 11:06
booo2222222222222217-Sep-09 11:06 
AnswerRe: c# back up program ? :S Pin
EliottA17-Sep-09 11:16
EliottA17-Sep-09 11:16 
GeneralRe: c# back up program ? :S Pin
booo2222222222222217-Sep-09 11:21
booo2222222222222217-Sep-09 11:21 
GeneralRe: c# back up program ? :S Pin
EliottA17-Sep-09 11:26
EliottA17-Sep-09 11:26 
GeneralRe: c# back up program ? :S Pin
booo2222222222222217-Sep-09 11:38
booo2222222222222217-Sep-09 11:38 
GeneralRe: c# back up program ? :S Pin
Not Active17-Sep-09 11:28
mentorNot Active17-Sep-09 11:28 
GeneralRe: c# back up program ? :S Pin
booo2222222222222217-Sep-09 11:33
booo2222222222222217-Sep-09 11:33 
GeneralRe: c# back up program ? :S Pin
EliottA17-Sep-09 11:46
EliottA17-Sep-09 11:46 

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.