Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("是否确认补仓?", "提示", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                int totqty = 0;
                for (int i = 0; i < vwDynamicBoxTaskList.Count; i++)
                {
                    DynamicBoxTask dynamicBox = vwDynamicBoxTaskList[i];
                    dynamicBox.SaveIn();
                    totqty += vwDynamicBoxTaskList[i].InQty;
                    //if (totqty >= 10)
                    //{
                    //    break;
                    //}
                }


                labnum1.Text = DynamicBoxTaskList.GetDynamicBoxTaskList(new DynamicBoxTaskList.QueryCondition("1", 0, "desc")).GetSumQty().ToString();
                labnum2.Text = DynamicBoxTaskList.GetDynamicBoxTaskList(new DynamicBoxTaskList.QueryCondition("1", 1, "desc")).GetSumQty().ToString();
                //labnum3.Text = DynamicBoxTaskList.GetDynamicBoxTaskList("3").GetSumQty().ToString();
                dgvwbDynamicBox.DataSource = vwDynamicBoxTaskList = DynamicBoxTaskList.GetDynamicBoxTaskList(new DynamicBoxTaskList.QueryCondition("1", 0, "desc"));
                dgvybDynamicBox.DataSource = ybDynamicBoxTaskList = DynamicBoxTaskList.GetDynamicBoxTaskList(new DynamicBoxTaskList.QueryCondition("1", 1, "desc"));
                SetNonDynamicBox();
            }
        }
Exemplo n.º 2
0
        private void DynamicBoxForm_Load(object sender, EventArgs e)
        {
            labnum1.Text = DynamicBoxTaskList.GetDynamicBoxTaskList(new DynamicBoxTaskList.QueryCondition("73", 0, "desc")).GetSumQty().ToString();
            labnum2.Text = DynamicBoxTaskList.GetDynamicBoxTaskList(new DynamicBoxTaskList.QueryCondition("73", 1, "desc")).GetSumQty().ToString();
            //labnum3.Text = DynamicBoxTaskList.GetDynamicBoxTaskList("3").GetSumQty().ToString();



            dgvwbDynamicBox.DataSource = vwDynamicBoxTaskList = DynamicBoxTaskList.GetDynamicBoxTaskList(new DynamicBoxTaskList.QueryCondition("73", 0, "desc"));
            dgvybDynamicBox.DataSource = ybDynamicBoxTaskList = DynamicBoxTaskList.GetDynamicBoxTaskList(new DynamicBoxTaskList.QueryCondition("73", 1, "desc"));


            SetNonDynamicBox();

            SetFinDynamicBox();
        }