private void bar_ChooseInvoice_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { AssemblySiteInventoryList f = new AssemblySiteInventoryList(1); if (f.ShowDialog(this) == DialogResult.OK && f.SelectItem != null) { this.txt_ID2.EditValue = this._assemblySiteDifference.AssemblySiteInventoryId = f.SelectItem.AssemblySiteInventoryId; this.date_Difference.EditValue = this._assemblySiteDifference.InvoiceDate = f.SelectItem.InvoiceDate; Model.AssemblySiteDifferenceDetai detail; this._assemblySiteDifference.Details.Clear(); foreach (var item in f.SelectItem.Details) { detail = new Book.Model.AssemblySiteDifferenceDetai(); detail.AssemblySiteDifferenceDetaiId = Guid.NewGuid().ToString(); detail.Product = item.Product; detail.ProductId = item.ProductId; detail.ActualQuantity = item.Quantity; detail.TheoryQuantity = this.CountSiteQuantity(detail.ProductId, f.SelectItem.InvoiceDate.Value.Date.AddDays(1)); this._assemblySiteDifference.Details.Add(detail); } this.gridControl1.RefreshDataSource(); } }
private void bar_Search_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { AssemblySiteInventoryList f = new AssemblySiteInventoryList(); f.ShowDialog(this); }