private void Clear() { txtOrder.Text = string.Empty; txtExpressOrder.Text = string.Empty; lblMaker.Text = string.Empty; lblDate.Text = string.Empty; lblCusName.Text = string.Empty; salBillVouch = null; }
/// <summary> /// 回写销售发票快递单号 /// </summary> /// <param name="?"></param> /// <returns></returns> public static bool UpdateSaleBillVouchExpressOrder(string connectionString, Model.SaleBillVouch data) { bool flag = false; string strSql = string.Format("UPDATE dbo.SaleBillVouch SET cSCCode ='{1}',cDefine13 ='{2}' WHERE cSBVCode='{0}'", data.cSBVCode, data.cSCCode, data.cDefine13); int result = DBHelperSQL.ExecuteSql(connectionString, strSql); if (result == 1) { flag = true; } return(flag); }
/// <summary> /// 输入单据号后回车 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void txtOrder_KeyPress(object sender, KeyPressEventArgs e) { string order = txtOrder.Text.Trim(); if (e.KeyChar == (char)Keys.Enter && !string.IsNullOrEmpty(order)) { string errMsg; salBillVouch = U8Business.ExpressOrderBusiness.GetSaleBillVouchByCSBVCode(order, out errMsg); if (salBillVouch == null) { MessageBox.Show(errMsg); return; } lblMaker.Text = salBillVouch.cMaker; lblDate.Text = salBillVouch.dDate.ToShortDateString(); lblCusName.Text = salBillVouch.cCusName; cmbExpress.SelectedValue = salBillVouch.cSCCode; txtExpressOrder.Focus(); txtExpressOrder.SelectAll(); } }