Example #1
0
        public masterSchedule()
        {
            InitializeComponent();

            Tattoo_Studio_2Entities context = new Tattoo_Studio_2Entities();

            var query = from schedule in context.Schedule
                        where schedule.MasterId == AuthPage.userID
                        join client in context.Client on schedule.ClientId equals client.ClientId
                        select new
            {
                Client = client.Name,
                Phone  = client.Phone,
                Time   = schedule.Date_and_time
            };

            scheduleDataGrid.ItemsSource = query.ToList();
        }
        public editMasterWork()
        {
            InitializeComponent();

            //Product product = context.Product.Find(Products.productID);
            //nametb.Text = product.Name;
            //quantitytb.Text = product.Quantity.ToString();
            //quantityunittb.Text = product.Quantity_unit;
            //costtb.Text = product.Cost.ToString();
            //cb1.SelectedValue = product.DiscountID;
            //cb2.SelectedValue = product.ManufacturerID;
            //descriptiontb.Text = product.Description;

            Tattoo_Studio_2Entities context = new Tattoo_Studio_2Entities();

            Portfolio portfolio = context.Portfolio.Find(masterWorks.workID);

            nameTb.Text = portfolio.Name;
        }
Example #3
0
        public adminSchedule()
        {
            InitializeComponent();

            Tattoo_Studio_2Entities context = new Tattoo_Studio_2Entities();

            var query = from schedule in context.Schedule
                        join client in context.Client on schedule.ClientId equals client.ClientId
                        join user in context.User on schedule.MasterId equals user.UserId
                        select new
            {
                Master = user.Name,
                Client = client.Name,
                Phone  = client.Phone,
                Time   = schedule.Date_and_time
            };

            scheduleDataGrid.ItemsSource = query.ToList();
        }