Esempio n. 1
0
        private void Btn_add_ware_Click(object sender, EventArgs e)
        {
            Ware ware = new Ware();

            ware.warecode    = txtwarecode.Text;
            ware.warename    = txtwarename.Text;
            ware.enable      = checkBox1.Checked;
            ware.rowcount    = Convert.ToInt32(txtrowcount.Text);
            ware.columncount = Convert.ToInt32(txtcolumncount.Text);
            ware.layercount  = Convert.ToInt32(txtlayercount.Text);

            WareManage.AddWare(ware);

            for (int i = 1; i <= ware.rowcount; i++)
            {
                for (int j = 1; j <= ware.columncount; j++)
                {
                    for (int k = 1; k <= ware.layercount; k++)
                    {
                        Point point = new Point();
                        point.pointcode  = ware.warecode + "_" + i.ToString("00") + j.ToString("00") + k.ToString("00");
                        point.areacode   = "";
                        point.pointstate = "";
                        point.warecode   = ware.warecode;
                        PointManage.AddPoint(point);
                    }
                }
            }


            MessageBox.Show("添加成功!");
            Close();
        }
Esempio n. 2
0
        private void Btn_select_Click(object sender, EventArgs e)
        {
            data_point.Rows.Clear();
            var points = PointManage.SelectPointByArea(WareCode, cbareas.SelectedItem.ToString());

            points.ForEach(point =>
            {
                data_point.Rows.Add(point.pointcode, point.pointstate, point.warecode);
            });
        }
Esempio n. 3
0
        private void Btn_select_point_Click(object sender, EventArgs e)
        {
            cbpointcode.Items.Clear();
            var points = PointManage.SelectPointByArea(WareCode, "");

            points.ForEach(point =>
            {
                cbpointcode.Items.Add(point.pointcode);
            });
            if (cbpointcode.Items.Count > 0)
            {
                cbpointcode.SelectedIndex = 0;
            }
        }
Esempio n. 4
0
        private void Btn_select_point_Click(object sender, EventArgs e)
        {
            data_point.Rows.Clear();
            var points = new List <Point>();

            if (cbareas_point.SelectedItem.ToString() == "全部区域")
            {
                points = PointManage.SelectPointByWare(cbwares_point.SelectedItem.ToString());
            }
            else
            {
                points = PointManage.SelectPointByArea(cbwares_point.SelectedItem.ToString(), cbareas_point.SelectedItem.ToString());
            }
            points.ForEach(point =>
            {
                data_point.Rows.Add(point.pointcode, point.areacode, point.warecode, point.pointstate);
            });
        }
Esempio n. 5
0
        private void Btn_select_point_Click(object sender, EventArgs e)
        {
            data_point.Rows.Clear();
            var points = new List <Point>();

            if (AreaCode == "全部区域")
            {
                points = PointManage.SelectPointByWare(WareCode);
            }
            else
            {
                points = PointManage.SelectPointByArea(WareCode, AreaCode);
            }
            points.ForEach(point =>
            {
                cbpoints.Items.Add(point.pointcode);
            });
            cbpoints.SelectedItem = PointCode;
        }
Esempio n. 6
0
 private void Btn_add_Click(object sender, EventArgs e)
 {
     PointManage.SetContainer(txtpointcode.Text, cbcontainers.SelectedItem.ToString());
     MessageBox.Show("添加完成!");
     Close();
 }
Esempio n. 7
0
 private void Btn_delete_container_Click(object sender, EventArgs e)
 {
     PointManage.RemoveContainer(cbpoints.SelectedItem.ToString(), data_point.SelectedRows[0].Cells[0].Value.ToString());
     MessageBox.Show("删除完成!");
 }