private void but_edit_Click(object sender, EventArgs e)
        {
            SortedList slindata = new SortedList();

            try
            {
                slindata.Add("id", dgv_01.SelectedRows[0].Cells["id"].Value);
                slindata.Add("ca_name", dgv_01.SelectedRows[0].Cells["ca_name"].Value);
                slindata.Add("bar_code", dgv_01.SelectedRows[0].Cells["bar_code"].Value);
                slindata.Add("customer_code", dgv_01.SelectedRows[0].Cells["customer_code"].Value);//值是barcode


                slindata.Add("cost_center", dgv_01.SelectedRows[0].Cells["cost_center"].Value);


                slindata.Add("ca_position", dgv_01.SelectedRows[0].Cells["ca_position"].Value);
            }
            catch
            {
                MessageBox.Show("请选择要修改的厂商。", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            HCSCM_set_manager_set_edit hcsm = new HCSCM_set_manager_set_edit(slindata);

            //获取一个值,指是否在Windows任务栏中显示窗体。
            hcsm.ShowInTaskbar = false;
            hcsm.ShowDialog();
            Loaddata(null);
        }
        private void but_edit_Click(object sender, EventArgs e)
        {
            if (this.dgv_01.SelectedRows.Count <= 0)
            {
                MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("choicechange", EnumPromptMessage.warning, new string[] { "修改", "实体包" }), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            int        selectedIndex = dgv_01.Rows.IndexOf(dgv_01.SelectedRows[0]);
            SortedList slindata      = new SortedList();

            try
            {
                slindata.Add("id", dgv_01.SelectedRows[0].Cells["id"].Value);
                slindata.Add("ca_name", dgv_01.SelectedRows[0].Cells["ca_name"].Value);
                slindata.Add("bar_code", dgv_01.SelectedRows[0].Cells["bar_code"].Value);
                slindata.Add("customer_code", dgv_01.SelectedRows[0].Cells["cu_name"].Value);//值是barcode
                slindata.Add("storage_id", dgv_01.SelectedRows[0].Cells["storage_id"].Value);
                slindata.Add("location_id", dgv_01.SelectedRows[0].Cells["location_id"].Value);
                slindata.Add("cost_center", dgv_01.SelectedRows[0].Cells["cc_name"].Value);
                slindata.Add("ca_position", dgv_01.SelectedRows[0].Cells["ca_position"].Value);
                slindata.Add("urgent", dgv_01.SelectedRows[0].Cells["urgent"].Value);
                slindata.Add("ca_priority", dgv_01.SelectedRows[0].Cells["ca_priority"].Value);
                slindata.Add("rfid_retrospect", dgv_01.SelectedRows[0].Cells["rfid_retrospect"].Value);
            }
            catch
            {
                MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("choicechange", EnumPromptMessage.warning, new string[] { "修改", "实体包" }), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            HCSCM_set_manager_set_edit hcsm = new HCSCM_set_manager_set_edit(slindata);

            //获取一个值,指是否在Windows任务栏中显示窗体。
            hcsm.ShowInTaskbar = false;
            hcsm.ShowDialog();
            GetData();
            if (dgv_01.Rows.Count > selectedIndex)
            {
                dgv_01.CurrentRow = dgv_01.Rows[selectedIndex];
            }
        }