Esempio n. 1
0
 public void AddToList_Filter(ref List <string> arg)
 {
     listView1.Items.Clear();
     try
     {
         ListViewItem    item           = null;
         string[]        inputParamters = new string[] { arg[1] };
         List <string[]> result         = new List <string[]>();
         bf = flow.InitFlow(flow.flowFlag.Get_query_recpt_record());
         bf.Do(ref result, ref inputParamters);
         for (int i = 0; i < result.Count; i++)
         {
             item = new ListViewItem(result[i]);
             listView1.Items.Add(item);
         }
     }
     catch (System.Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
 //全查询
 public void AddToList()
 {
     listView1.Items.Clear();
     try
     {
         string          item_no     = "";
         string          item_name   = "";
         string          shoppe_name = "";
         string          barcode     = "";
         string          issue_qty   = "";
         string          rt_stock    = "";
         string          work_date   = "";
         string          imageName   = "";
         ListViewItem    item        = null;
         List <string[]> result      = new List <string[]>();
         Flow            flow        = new Flow();
         base_Flow       bf          = flow.InitFlow(flow.flowFlag.Get_query_issue_record());
         //"品名", "专柜商品名称", "条码", "货号", "发货量", "库存", "更新时间" ,"图像文件名"
         bf.Do(ref result);
         //
         for (int i = 0; i < result.Count; i++)
         {
             item_name   = result[i][0];
             shoppe_name = result[i][1];
             barcode     = result[i][2];
             item_no     = result[i][3];
             issue_qty   = result[i][4];
             rt_stock    = result[i][5];
             work_date   = result[i][6];
             imageName   = result[i][7];
             item        = new ListViewItem(new string[] { item_name, shoppe_name, barcode, item_no, issue_qty, rt_stock, work_date, imageName });
             listView1.Items.Add(item);
         }
     }
     catch (System.Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }