private void btnEditSchedule_Click(object sender, RoutedEventArgs e) { try { if (dgdInvoice.SelectedIndex >= 0) { DataRow dr = dt.Rows[dgdInvoice.SelectedIndex]; Invoice inv = new Invoice(); inv.InvoiceID = (int)dr["InvoiceID"]; inv.CustomerID = dr["CustomerID"].ToString(); inv.Description = dr["Description"].ToString(); inv.ShipmentDate = (DateTime)dr["ShipmentDate"]; inv.ShipperID = (int)dr["ShipperID"]; inv.StaffID = (int)dr["StaffID"]; inv.Status = dr["Status"].ToString(); inv.Total = (double)dr["Total"]; EditSchedule es = new EditSchedule(inv, Shippers); es.EditFinished += new ActionCompleted(EditCurRow); es.ShowDialog(); } } catch(Exception g) { System.Windows.Forms.MessageBox.Show(g.Message); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.frmScheEdit = ((FastDeliveryGroup.Presentation.StaffForm.EditSchedule)(target)); return; case 2: this.ProductID_Copy = ((System.Windows.Controls.Label)(target)); return; case 3: this.ProductID_Copy1 = ((System.Windows.Controls.Label)(target)); return; case 4: this.ProductID_Copy2 = ((System.Windows.Controls.Label)(target)); return; case 5: this.ProductID_Copy3 = ((System.Windows.Controls.Label)(target)); return; case 6: this.txtPrice = ((System.Windows.Controls.TextBox)(target)); return; case 7: this.btnOk = ((System.Windows.Controls.Button)(target)); return; case 8: this.btnCancel = ((System.Windows.Controls.Button)(target)); return; case 9: this.cbxShipper = ((System.Windows.Controls.ComboBox)(target)); return; case 10: this.ProductID_Copy4 = ((System.Windows.Controls.Label)(target)); return; case 11: this.comboBox = ((System.Windows.Controls.ComboBox)(target)); return; case 12: this.txtDescription = ((System.Windows.Controls.RichTextBox)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.frmScheEdit = ((FastDeliveryGroup.Presentation.StaffForm.EditSchedule)(target)); return; case 2: #line 11 "..\..\..\..\Presentation\StaffForm\ScheduleEditing.xaml" ((System.Windows.Controls.Grid)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Grid_Loaded); #line default #line hidden return; case 3: this.ProductID_Copy = ((System.Windows.Controls.Label)(target)); return; case 4: this.ProductID_Copy1 = ((System.Windows.Controls.Label)(target)); return; case 5: this.ProductID_Copy2 = ((System.Windows.Controls.Label)(target)); return; case 6: this.ProductID_Copy3 = ((System.Windows.Controls.Label)(target)); return; case 7: this.btnOk = ((System.Windows.Controls.Button)(target)); #line 16 "..\..\..\..\Presentation\StaffForm\ScheduleEditing.xaml" this.btnOk.Click += new System.Windows.RoutedEventHandler(this.btnOk_Click); #line default #line hidden return; case 8: this.btnCancel = ((System.Windows.Controls.Button)(target)); return; case 9: this.cbbShipper = ((System.Windows.Controls.ComboBox)(target)); return; case 10: this.dpDeliTime = ((System.Windows.Controls.DatePicker)(target)); return; case 11: this.ProductID_Copy4 = ((System.Windows.Controls.Label)(target)); return; case 12: this.cbbStatus = ((System.Windows.Controls.ComboBox)(target)); return; case 13: this.txtDescription = ((System.Windows.Controls.TextBox)(target)); return; case 14: this.lblTotal = ((System.Windows.Controls.Label)(target)); return; } this._contentLoaded = true; }