public AttactStcokwithProduct() { InitializeComponent(); timer = new Timer(200000); timer.Start(); timer.Elapsed += new ElapsedEventHandler(timer_Elapsed); db = new uma24DataContext(); this.girdProductSource.DataContext = db.ProductSourceDetails; }
void Init() { for (int i = 0; i < 24; i++) { time[i] = i + 1; } db = new uma24DataContext(); this.CalulateGrid.DataContext = db.Orders; this.comboBox1.ItemsSource = db.Employees.Where(p => p.type != null).Select(p => p.EmployeeName); this.cmbTimeA.ItemsSource = time; this.cmbTimeA.SelectedIndex = DateTime.Now.Hour; this.cmbTimeB.ItemsSource = time; this.cmbTimeB.SelectedIndex = DateTime.Now.Hour; this.dateBefore.Text = DateTime.Now.AddDays(-1).ToShortDateString(); this.dateAfter.Text = DateTime.Now.ToShortDateString(); }
private void btnClose_Click(object sender, RoutedEventArgs e) { db.SubmitChanges(); db = null; this.Close(); }
public StockScreen() { InitializeComponent(); db = new uma24DataContext(); this.StocksGrid.DataContext = db.Stocks; }