private void DoCancelOut() { List <Bills> selectedList = GetSelectedBills(); StockBillService stockBillService = new StockBillService(); foreach (Bills bill in selectedList) { Bills b = stockBillService.FindBill(bill.ID); stockBillService.CancelOutBill(bill, PermissionService.GetCurrentUser().Name, DateTime.Now, "冲销的票据"); } this.DoReset(); }
public void DoCancelOut() { List <StockBill> selectedList = GetSelectedStockBills(); StockBillService service = new StockBillService(); foreach (StockBill bill in selectedList) { StockBill b = service.FindBill(bill.ID); service.CancelOutBill(bill, PermissionService.GetCurrentUser().Name, DateTime.Now, ""); } this.DoReset(); }
private void DoBlankOut() { List <Bills> selectedList = GetSelectedBills(); StockBillService stockBillService = new StockBillService(); foreach (Bills bill in selectedList) { Bills b = stockBillService.FindBill(bill.ID); stockBillService.BlankOutBill(b, "作废的票据"); } this.DoReset(); }
public void DoBlankOut() { List <StockBill> selectedList = GetSelectedStockBills(); StockBillService service = new StockBillService(); foreach (StockBill bill in selectedList) { StockBill b = service.FindBill(bill.ID); service.BlankOutBill(b, ""); } this.DoReset(); }
private void dgvBillsList_SelectionChanged(object sender, EventArgs e) { try { dgvBillsItemList.Rows.Clear(); if (dgvBillsList.SelectedRows.Count > 0) { Bills bill = (Bills)dgvBillsList.SelectedRows[0].Tag; StockBillService stockBillService = new StockBillService(); bill = stockBillService.FindBill(bill.ID); foreach (BillsItem item in bill.Items) { DataGridViewRow row = new DataGridViewRow(); row.Tag = item; DataGridViewTextBoxCell cell = null; cell = new DataGridViewTextBoxCell(); cell.Value = item.Drugs.Code; row.Cells.Add(cell); cell = new DataGridViewTextBoxCell(); cell.Value = item.Drugs.Name; row.Cells.Add(cell); cell = new DataGridViewTextBoxCell(); cell.Value = item.UnitPrice.ToString("0.00"); row.Cells.Add(cell); cell = new DataGridViewTextBoxCell(); cell.Value = item.Drugs.Category.Name; row.Cells.Add(cell); cell = new DataGridViewTextBoxCell(); cell.Value = item.Drugs.From.Name; row.Cells.Add(cell); cell = new DataGridViewTextBoxCell(); cell.Value = item.Drugs.Unit; row.Cells.Add(cell); cell = new DataGridViewTextBoxCell(); cell.Value = item.Drugs.Standard; row.Cells.Add(cell); cell = new DataGridViewTextBoxCell(); cell.Value = item.Count; row.Cells.Add(cell); cell = new DataGridViewTextBoxCell(); cell.Value = item.Money.ToString("0.00"); row.Cells.Add(cell); dgvBillsItemList.Rows.Add(row); } } } catch (Exception ex) { ErrorHandler.OnError(ex); } }