/// <summary> /// 查询剩余电子面单数量 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnGetElecCount_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtCustomerID.Text.Trim())) { txtCustomerID.Focus(); txtCustomerID.Select(); txtCustomerID.ShowTip("商家ID必填"); return; } if (string.IsNullOrEmpty(txtCustomerPassword.Text.Trim())) { txtCustomerPassword.Focus(); txtCustomerPassword.Select(); txtCustomerPassword.ShowTip("商家ID密码必填"); return; } var elecUserInfoEntity = new ZtoElecUserInfoEntity(); elecUserInfoEntity.Kehuid = txtCustomerID.Text.Replace(" ", ""); elecUserInfoEntity.Pwd = txtCustomerPassword.Text.Replace(" ", ""); var result = ZtoElecBillHelper.GetElecBillCount(elecUserInfoEntity); int elecBillCount = 0; if (int.TryParse(result, out elecBillCount)) { XtraMessageBox.Show(string.Format("商家ID为:{1}可用线下电子面单数量为:{0}条", result, elecUserInfoEntity.Kehuid), AppMessage.MSG0000, MessageBoxButtons.OK, MessageBoxIcon.Information); } else { XtraMessageBox.Show(result, AppMessage.MSG0000, MessageBoxButtons.OK, MessageBoxIcon.Error); } }