/// <summary> /// 窗体加载事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void SalesLibrary_Load(object sender, EventArgs e) { txtDelivery.Text = showCode; lblcCusName.Text = cCusName; Clear(); string errMsg; try { //显示等待 Cursor.Current = Cursors.WaitCursor; dispatchList = new BLL.Consignment().Load(cDLCode, out errMsg); if (dispatchList != null) { //把销售发货对象转换成销售出库对象 rdRecord = EntityConvert.ConvertToRdrecord(dispatchList); btnSource.Enabled = true; txtBarcode.Focus(); } else { MessageBox.Show(errMsg); } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { Cursor.Current = Cursors.Default; } }