private void InsertDropDownMenuEvt(Guid Pid) { var po = this.PharmacyDatabaseService.GetPurchaseOrderEntity(out msg, Pid); PurchaseBusiness.FormPurchaseOrderEdit frm = new FormPurchaseOrderEdit(po, false, true); frm.Show(this); }
private void queryDetails(int type) { if (this.dataGridView1.SelectedCells.Count <= 0) { return; } Business.Models.PurchaseOrderReturnModel m = this.dataGridView1.Rows[this.dataGridView1.SelectedCells[this.dataGridView1.SelectedCells.Count - 1].RowIndex].DataBoundItem as Business.Models.PurchaseOrderReturnModel; if (type == 0) { PurchaseCommonEntity pce = this.PharmacyDatabaseService.GetPurchaseOrderReturnsByPurchaseOrderId(out msg, m.Pid).FirstOrDefault(); if (pce == null) { return; } pce.Id = m.id; FormReturnOrder frm = new FormReturnOrder(pce, true); frm.ShowDialog(); } if (type == 1) { PurchaseOrdeEntity poe = this.PharmacyDatabaseService.GetPurchaseOrderEntity(out msg, m.Pid); if (poe == null) { return; } FormPurchaseOrderEdit frm = new FormPurchaseOrderEdit(poe, false, true); frm.ShowDialog(); } }
private void GetPurchaseOrder() { Guid Pid = ((ReturnPurchaseOrderList)this.dataGridView1.CurrentRow.DataBoundItem).id; PurchaseOrdeEntity poe = this.PharmacyDatabaseService.GetPurchaseOrderEntity(out msg, Pid); FormPurchaseOrderEdit frm = new FormPurchaseOrderEdit(poe, false, true); frm.Show(this); }
/// <summary> /// 获取定单详细 /// </summary> private void getPurchaseOrderDetails() { Guid PID = ((Business.Models.PurchaseTaxReturn) this.dataGridView1.CurrentRow.DataBoundItem).Id; Business.Models.PurchaseOrdeEntity poe = this.PharmacyDatabaseService.GetPurchaseOrderEntity(out msg, PID); FormPurchaseOrderEdit frm = new FormPurchaseOrderEdit(poe, false, true); frm.ShowDialog(); }
private void btnModifyPurchaseAmount_Click(object sender, EventArgs e) { //临时处理 PurchaseOrder purchaseOrder = this.PharmacyDatabaseService.GetPurchaseOrder(out msg, _order.PurchaseOrderId); PurchaseOrdeEntity[] orderEntity = this.PharmacyDatabaseService.GetPurchaseOrders(out msg, purchaseOrder.DocumentNumber, DateTime.Now.AddYears(-100), DateTime.Now.AddYears(100), new int[] { }, new Guid[] { }, 1, 1); if (orderEntity.Count() > 0) { FormPurchaseOrderEdit form = new FormPurchaseOrderEdit(orderEntity[0], true); form.ShowDialog(); } //_order.PurchaseOrderId; //FormPurchaseOrderEdit form = new FormPurchaseOrderEdit(selectedOrder); //form.ShowDialog(); }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { //进入编辑页面 //获得当前采购单的状态 string msg = string.Empty; try { if (e.RowIndex < 0) { return; } PurchaseOrdeEntity selectedOrder = _listPurchaseOrder[e.RowIndex]; PurchaseOrderDetail[] purchaseOrderList = PharmacyDatabaseService.GetPurchaseOrderDetailByOrderId(out msg, (Guid)selectedOrder.Id); var p = from i in purchaseOrderList where i.Deleted == false select i; //var q = from k in purchaseOrderList where k.Deleted select k; //foreach(var j in p) { if (selectedOrder.OrderStatusValue == OrderStatus.PurchaseReceinvingAmountDiff.GetHashCode()) { FormPurchaseOrderEdit form = new FormPurchaseOrderEdit(selectedOrder, true); form.ShowDialog(); } else { FormPurchaseOrderEdit form = new FormPurchaseOrderEdit(selectedOrder); form.ShowDialog(); } this.Search(); } //foreach (var m in q) //{ // _listPurchaseOrder[e.RowIndex].OrderStatusValue = 120; // MessageBox.Show("已删除"); // this.Search(); //} } catch (Exception ex) { MessageBox.Show(ex.Message, "错误", MessageBoxButtons.OK); Log.Error(ex); } }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { //进入编辑页面 //获得当前采购单的状态 try { if (e.RowIndex < 0) { return; } PurchaseOrdeEntity selectedOrder = _listPurchaseOrder[e.RowIndex]; FormPurchaseOrderEdit form = new FormPurchaseOrderEdit(selectedOrder); form.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message, "错误", MessageBoxButtons.OK); Log.Error(ex); } }