private void InitQueryConSignmentBill() { QuerySignmentBill(null); SelectedConsignmentBillLists.Clear(); _consignmentService.GetUserSelectedConsignmentBill(user.ID).ToList().ForEach(x => SelectedConsignmentBillLists.Add(x)); SelectedConsignmentSum = SelectedConsignmentBillLists.Where(m => m.SelectedStatus > 0).Sum(m => m.CurrencyQuantity); }
private void ClearSelectedConsignmentBillLists(object obj) { if (SelectedConsignmentBillLists.Count() > 0) { string ids = "'" + string.Join("','", SelectedConsignmentBillLists.Select(x => x.BillNo)) + "'"; SelectedConsignmentBillLists.Clear(); SelectedConsignmentSum = 0; ConsignmentBillEntries.Clear(); _consignmentService.ClearSelectedConsignmentBills(ids); QuerySignmentBill(null); } }
private void MergeConsignmentBill(object obj) { if (SelectedConsignmentBillLists.Count() > 0) { string fInterIds = string.Join(",", SelectedConsignmentBillLists.Select(m => m.InterId)); string fbillNos = "'" + string.Join("','", SelectedConsignmentBillLists.Select(m => m.BillNo)) + "'"; string rollbackMsg = _consignmentService.MergeConsignmentBill(user.ID, fInterIds, fbillNos); if (string.IsNullOrEmpty(rollbackMsg)) { SelectedConsignmentBillLists.Clear(); SelectedConsignmentSum = 0; QuerySignmentBill(null); GetShippingBills(); } else { MessageBox.Show(rollbackMsg); } } }