Exemplo n.º 1
0
        private void menu_Stock_Modify_Click(object sender, EventArgs e)
        {
            if (this.winGridView1.dataGridView1.SelectedRows.Count < 0)
            {
                return;
            }

            string message = string.Format("您是否确认是进行平仓?");

            if (MessageUtil.ShowYesNoAndWarning(message) == DialogResult.Yes)
            {
                foreach (DataGridViewRow item in this.winGridView1.dataGridView1.SelectedRows)
                {
                    string ID = item.Cells["ID"].Value.ToString();
                    if (!string.IsNullOrEmpty(ID))
                    {
                        FrmEditStock dlg = new FrmEditStock();
                        dlg.ID = ID;
                        if (DialogResult.OK == dlg.ShowDialog())
                        {
                            BindStockData();
                        }
                    }
                    break;
                }
            }
        }
Exemplo n.º 2
0
        private void menu_ModifyStock_Click(object sender, EventArgs e)
        {
            int[] rowSelected = this.winGridView1.GridView1.GetSelectedRows();
            if (rowSelected == null)
            {
                return;
            }

            foreach (int iRow in rowSelected)
            {
                string ID = this.winGridView1.gridView1.GetRowCellDisplayText(iRow, "ID");
                if (!string.IsNullOrEmpty(ID))
                {
                    StockInfo info = BLLFactory <Stock> .Instance.FindByID(ID);

                    if (info != null)
                    {
                        FrmEditStock dlg = new FrmEditStock();
                        dlg.ID        = ID;
                        dlg.WareHouse = info.WareHouse;
                        if (DialogResult.OK == dlg.ShowDialog())
                        {
                            BindData();
                        }
                    }
                }
                break;
            }
        }