Ejemplo n.º 1
0
        private void initalData()
        {
            Memange_service myservice  = new Memange_service();
            InKu_service    inservice  = new InKu_service();
            Outku_service   outservice = new Outku_service();
            IList <Remain>  remainlist = myservice.getAllRemainInfos();
            IList <InKu>    inkulist   = inservice.getAllInkus();
            IList <Outku>   outkulist  = outservice.getAllOutkus();

            this.dataGridView1.Rows.Clear();
            this.inku_datagridview.Rows.Clear();
            this.dataGridView2.Rows.Clear();

            for (int i = 0; i < remainlist.Count; i++)
            {
                Remain   remain = remainlist[i];
                String[] row    = { remain.Cangkuname, remain.Productname, remain.Remainnum.ToString() };
                this.dataGridView1.Rows.Add(row);
            }

            for (int j = 0; j < inkulist.Count; j++)
            {
                InKu     inku = inkulist[j];
                String[] row1 = { inku.In_id, inku.Pro_id, inku.In_time, inku.Cangku_id, inku.In_num.ToString() };
                this.inku_datagridview.Rows.Add(row1);
            }


            for (int k = 0; k < outkulist.Count; k++)
            {
                Outku    outku = outkulist[k];
                String[] row2  = { outku.Out_id, outku.Pro_id, outku.Out_time, outku.Cangku_id, outku.Out_num.ToString() };
                this.dataGridView2.Rows.Add(row2);
            }
        }
Ejemplo n.º 2
0
        //显示所有的出库单内容
        private void button7_Click(object sender, EventArgs e)
        {
            Outku_service out_ser = new Outku_service();
            IList <Outku> list    = out_ser.getAllOutkus();

            this.dataGridView2.Rows.Clear();
            int count = list.Count;

            for (int i = 0; i < count; i++)
            {
                Outku outku = list[i];

                String[] row = { outku.Out_id, outku.Pro_id, outku.Out_time, outku.Cangku_id, outku.Out_num.ToString() };
                this.dataGridView2.Rows.Add(row);
            }
        }