private void gridOrderItem_CellDoubleClick(object sender, ODGridClickEventArgs e) { FormSupplyOrderItemEdit FormS = new FormSupplyOrderItemEdit(); FormS.ItemCur = SupplyOrderItems.CreateObject(PIn.Long(tableOrderItem.Rows[e.Row]["SupplyOrderItemNum"].ToString())); FormS.ListSupplier = listSupplier; FormS.ShowDialog(); if (FormS.DialogResult == DialogResult.OK) { FillGridOrderItem(); } //still need to reselect item }
private void gridOrderItem_CellDoubleClick(object sender, ODGridClickEventArgs e) { FormSupplyOrderItemEdit FormSOIE = new FormSupplyOrderItemEdit(); FormSOIE.ItemCur = SupplyOrderItems.CreateObject(PIn.Long(_tableOrderItems.Rows[e.Row]["SupplyOrderItemNum"].ToString())); FormSOIE.ListSupplier = Suppliers.GetAll(); FormSOIE.ShowDialog(); if (FormSOIE.DialogResult != DialogResult.OK) { return; } SupplyOrderItems.Update(FormSOIE.ItemCur); UpdatePriceAndRefresh(); }
private void gridOrderItem_CellDoubleClick(object sender, ODGridClickEventArgs e) { FormSupplyOrderItemEdit formSupplyOrderItemEdit = new FormSupplyOrderItemEdit(); formSupplyOrderItemEdit.SupplyOrderItemCur = SupplyOrderItems.SelectOne(PIn.Long(_tableOrderItems.Rows[e.Row]["SupplyOrderItemNum"].ToString())); formSupplyOrderItemEdit.ListSuppliersAll = Suppliers.GetAll(); formSupplyOrderItemEdit.ShowDialog(); if (formSupplyOrderItemEdit.DialogResult != DialogResult.OK) { return; } //SupplyOrderItems.Update(formSupplyOrderItemEdit.SupplyOrderItemCur); UpdatePriceAndRefresh(); }
private void gridOrderItem_CellDoubleClick(object sender, ODGridClickEventArgs e) { FormSupplyOrderItemEdit FormSOIE = new FormSupplyOrderItemEdit(); FormSOIE.ItemCur = SupplyOrderItems.CreateObject((long)tableOrderItems.Rows[e.Row]["SupplyOrderItemNum"]); FormSOIE.ListSupplier = Suppliers.CreateObjects(); FormSOIE.ShowDialog(); if (FormSOIE.DialogResult != DialogResult.OK) { return; } SupplyOrderItems.Update(FormSOIE.ItemCur); ListOrdersAll = SupplyOrders.GetAll(); //force refresh because total might have changed. int gridSelect = gridOrders.SelectedIndices[0]; FillGridOrders(); gridOrders.SetSelected(gridSelect, true); FillGridOrderItem(); }
private void gridOrderItem_CellDoubleClick(object sender,ODGridClickEventArgs e) { FormSupplyOrderItemEdit FormS=new FormSupplyOrderItemEdit(); FormS.ItemCur=SupplyOrderItems.CreateObject(PIn.Long(tableOrderItem.Rows[e.Row]["SupplyOrderItemNum"].ToString())); FormS.ListSupplier=listSupplier; FormS.ShowDialog(); if(FormS.DialogResult==DialogResult.OK) { FillGridOrderItem(); } //still need to reselect item }
private void gridOrderItem_CellDoubleClick(object sender,ODGridClickEventArgs e) { FormSupplyOrderItemEdit FormSOIE = new FormSupplyOrderItemEdit(); FormSOIE.ItemCur = SupplyOrderItems.CreateObject((long)tableOrderItems.Rows[e.Row]["SupplyOrderItemNum"]); FormSOIE.ListSupplier = Suppliers.CreateObjects(); FormSOIE.ShowDialog(); if(FormSOIE.DialogResult!=DialogResult.OK) { return; } SupplyOrderItems.Update(FormSOIE.ItemCur); ListOrdersAll = SupplyOrders.GetAll();//force refresh because total might have changed. int gridSelect = gridOrders.SelectedIndices[0]; FillGridOrders(); gridOrders.SetSelected(gridSelect,true); FillGridOrderItem(); }