Ejemplo n.º 1
0
 private void onSearch(string keyword)
 {
     try
     {
         var list = _service.GetExpressCompanyList(keyword);
         gridControl.DataSource = list;
         gridControl.Focus();
     }
     catch (Exception e)
     {
         MsgHelper.ShowException(e);
     }
 }
Ejemplo n.º 2
0
        private void btnBatchUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                var indexs = BillGrid.GetSelectedRows();
                if (indexs != null && indexs.Length > 0)
                {
                    var lhodonos = new List <string>();

                    foreach (var i in indexs)
                    {
                        var no = BillGrid.GetRowCellValue(i, "LHODONO");

                        lhodonos.Add($"{no}");
                    }

                    var megBills = _service.GetMergeBills(lhodonos.ToArray());

                    if (megBills.Length > 1)
                    {
                        MsgHelper.ShowInformation("已选单据不在同一分货单中,不能批量修改");
                    }

                    FrmBatchOutBoundOrder frm = new FrmBatchOutBoundOrder();
                    frm.Result    = megBills.SingleOrDefault();
                    frm.LHOBODNOS = lhodonos;
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                    }
                }
            }
            catch (Exception exception)
            {
                MsgHelper.ShowException(exception);
            }
        }