Click here to Skip to main content
15,892,575 members
Home / Discussions / WPF
   

WPF

 
QuestionHow to modify DataTemplate programmatically? Pin
Tesic Goran16-May-11 1:24
professionalTesic Goran16-May-11 1:24 
AnswerRe: How to modify DataTemplate programmatically? Pin
Abhinav S16-May-11 2:04
Abhinav S16-May-11 2:04 
GeneralRe: How to modify DataTemplate programmatically? Pin
Tesic Goran16-May-11 2:35
professionalTesic Goran16-May-11 2:35 
AnswerRe: How to modify DataTemplate programmatically? Pin
Abhinav S16-May-11 3:10
Abhinav S16-May-11 3:10 
AnswerRe: How to modify DataTemplate programmatically? Pin
Mark Salsbery16-May-11 2:44
Mark Salsbery16-May-11 2:44 
GeneralRe: How to modify DataTemplate programmatically? Pin
Tesic Goran16-May-11 3:00
professionalTesic Goran16-May-11 3:00 
GeneralRe: How to modify DataTemplate programmatically? Pin
Mark Salsbery16-May-11 3:04
Mark Salsbery16-May-11 3:04 
AnswerRe: How to modify DataTemplate programmatically? Pin
SledgeHammer0116-May-11 6:21
SledgeHammer0116-May-11 6:21 
GeneralRe: How to modify DataTemplate programmatically? Pin
Tesic Goran17-May-11 1:24
professionalTesic Goran17-May-11 1:24 
GeneralRe: How to modify DataTemplate programmatically? Pin
Pete O'Hanlon17-May-11 1:54
mvePete O'Hanlon17-May-11 1:54 
Questionobjects added to an IDictionary must have a Key attribute [modified] Pin
Lutosław15-May-11 23:20
Lutosław15-May-11 23:20 
NewsRe: objects added to an IDictionary must have a Key attribute Pin
Lutosław16-May-11 0:05
Lutosław16-May-11 0:05 
AnswerRe: objects added to an IDictionary must have a Key attribute Pin
Venkatesh Mookkan16-May-11 0:41
Venkatesh Mookkan16-May-11 0:41 
AnswerRe: objects added to an IDictionary must have a Key attribute Pin
markovl16-May-11 0:53
markovl16-May-11 0:53 
AnswerRe: objects added to an IDictionary must have a Key attribute Pin
Venkatesh Mookkan16-May-11 0:58
Venkatesh Mookkan16-May-11 0:58 
GeneralRe: objects added to an IDictionary must have a Key attribute Pin
Lutosław16-May-11 1:17
Lutosław16-May-11 1:17 
QuestionPayment Gateway in Silverlight [modified] Pin
Vimalsoft(Pty) Ltd15-May-11 1:59
professionalVimalsoft(Pty) Ltd15-May-11 1:59 
AnswerRe: Payment Gateway in Silverlight Pin
BobJanova16-May-11 22:45
BobJanova16-May-11 22:45 
QuestionControl Template not applied Pin
Lutosław14-May-11 10:11
Lutosław14-May-11 10:11 
AnswerRe: Control Template not applied Pin
SledgeHammer0114-May-11 10:59
SledgeHammer0114-May-11 10:59 
GeneralRe: Control Template not applied Pin
Lutosław14-May-11 11:53
Lutosław14-May-11 11:53 
NewsRe: Control Template not applied Pin
Lutosław14-May-11 13:12
Lutosław14-May-11 13:12 
GeneralRe: Control Template not applied [modified] Pin
Mark Salsbery14-May-11 13:21
Mark Salsbery14-May-11 13:21 
GeneralRe: Control Template not applied Pin
Lutosław14-May-11 14:29
Lutosław14-May-11 14:29 
QuestionObject looses a Cookie Value in Silverlight Pin
Vimalsoft(Pty) Ltd14-May-11 5:12
professionalVimalsoft(Pty) Ltd14-May-11 5:12 
Good Day All

I have a strange situation here. When a user logs in i store the username or userid in the Cookie. So i have a generic method that retrieves that value and when i debug this, i can see that the value is retrieved nicely and i assign that value to a property like this

ContactsModel model = new ContactsModel();
                model.iUserid = Convert.ToInt32(GenericMethods.GenericMethods.GetCookie("UserID"));


and after that Asynchronously i call the Business Layer WCF Service

like this

business.AddContactNumberAsync(model);
business.AddContactNumberCompleted += new EventHandler<AddContactNumberCompletedEventArgs>(business_AddContactNumberCompleted);



and the Completed Event like this

void business_AddContactNumberCompleted(object sender, AddContactNumberCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                if (e.Result.ToString() == "")
                {
                    lblError.Visibility = System.Windows.Visibility.Visible;
                    lblError.Content = "Successfully Added";
                    lblError.Background = new SolidColorBrush(Colors.Green);
                    this.DialogResult = true;
                }
                else
                {
                    lblError.Visibility = System.Windows.Visibility.Visible;
                    lblError.Content = e.Result;//"Service not Available";
                    lblError.Background = new SolidColorBrush(Colors.Red);
                }
            }
            else
            {
                lblError.Visibility = System.Windows.Visibility.Visible;
                lblError.Content = e.Result; //"Service not Available";
                lblError.Background = new SolidColorBrush(Colors.Red);

            }
        }


and in my Business Layer Service , i wanted to make if the value is corrupted in the Silverlight side or Business Layer side and i receive a call like this in the Business layere Service

public string AddContactNumber(ContactsModel Model)
 {
     string Error = string.Empty;

     eCashDataLayer.IeCashDatalayerClient Datalayer = new IeCashDatalayerClient();

     if (Model.iUserid != 0)
     {
         Error = Datalayer.AddContactNumber(Model);
     }
     else
     {
         Error = "Invalid Userid";
     }

     return Error;
 }


it always return "Invalid Userid" , i am not sure what is the problem because this has been working all along.

Thanks
Vuyiswa Maseko,

Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.

C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/

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.