Exemple #1
0
        public Klient()
        {
            InitializeComponent();

            var context = this.Resources["KlientContext"] as AwesomePartsContext;
            var profileContext = new ProfileContext();

            string userName = WebContext.Current.User.GetIdentity() as string;
            EntityQuery<ProfileData> query = profileContext.GetUserIdByUserNameQuery(userName);
            profileContext.Load<ProfileData>(query, LoadUserIdCompleted, null);

            ZamowienieSource = CreateAndInitializeDomainDataSource("dds", context, false, "GetAktualneZamowienieByKlientId");
            ZamowienieSource.LoadedData += new EventHandler<LoadedDataEventArgs>(ZamowienieSource_LoadedData);
            ZamowienieSource.SubmittedChanges += new EventHandler<SubmittedChangesEventArgs>(ZamowienieSource_SubmittedChanges);
            KoszykSource = CreateAndInitializeDomainDataSource("KoszykSource", context, false, "GetKoszykByZamowienieId");
            KoszykSource.LoadedData += new EventHandler<LoadedDataEventArgs>(KoszykSource_LoadedData);
            GrupujCB.SelectionChanged +=new SelectionChangedEventHandler(GrupujCB_SelectionChanged);
        }
 public void SetParentWindow(ProfileDisplay window)
 {
     this.parentWindow = window;
     this.RegistrationData = parentWindow.RegistrationData;
     profileContext = parentWindow.Resources["ProfilContext"] as ProfileContext;
 }