/// <summary> /// 品牌值改变事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void mcbVBIS_Brand_SelectedIndexChanged(object sender, EventArgs e) { if (string.IsNullOrEmpty(mcbVBIS_Brand.SelectedValue)) { mcbVBIS_Inspire.Clear(); mcbVBIS_Inspire.DataSource = null; return; } mcbVBIS_Inspire.Clear(); //车系 if (_vehicleInspireList != null) { var curVehicleInspireList = _vehicleInspireList.Where(x => !string.IsNullOrEmpty(x.VBIS_Inspire) && mcbVBIS_Brand.SelectedValue.Contains(x.VBIS_Brand)).ToList(); mcbVBIS_Inspire.DataSource = curVehicleInspireList; } txtVBIS_BrandSpellCode.Text = ChineseSpellCode.GetShortSpellCode(mcbVBIS_Brand.SelectedValue); }
/// <summary> /// 导入配件档案 /// </summary> /// <param name="paramImportAutoPartsArchiveList">待导入的配件档案列表</param> /// <returns></returns> public bool ImportAutoPartsArchive(List <ImportAutoPartsArchiveUIModel> paramImportAutoPartsArchiveList) { var funcName = "ImportAutoPartsArchive"; LogHelper.WriteBussLogStart(Trans.BS, LoginInfoDAX.UserName, funcName, "", "", null); if (paramImportAutoPartsArchiveList == null || paramImportAutoPartsArchiveList.Count == 0) { //待导入的数据为空 ResultMsg = MsgHelp.GetMsg(MsgCode.E_0000, new object[] { "待导入的数据为空" }); return(true); } try { #region 通过平台接口导入并返回配件档案列表 var jsonAutoPartsPriceTypeList = (JValue)JsonConvert.SerializeObject(paramImportAutoPartsArchiveList); string argsPostData = string.Format(ApiParameter.BF0046, ConfigurationManager.AppSettings[AppSettingKey.MCT_CODE], jsonAutoPartsPriceTypeList); string strApiData = APIDataHelper.GetAPIData(ApiUrl.BF0046Url, argsPostData); //本地调试: //string strApiData = APIDataHelper.GetAPIData("http://*****:*****@ImportAutoPartsArchiveList", SqlDbType.Structured); cmd.Parameters[0].Value = importAutoPartsArchiveDataTable; cmd.Parameters.Add("@ResultCode", SqlDbType.VarChar, 50); cmd.Parameters[1].Direction = ParameterDirection.Output; cmd.ExecuteNonQuery(); sqlCon.Close(); string resultCode = cmd.Parameters[1].Value?.ToString(); if (resultCode == "导入失败") { ResultMsg = MsgHelp.GetMsg(MsgCode.E_0010, new object[] { SystemActionEnum.Name.IMPORT + SystemTableEnums.Name.BS_AutoPartsArchive }); return(false); } #endregion } catch (Exception ex) { ResultMsg = MsgHelp.GetMsg(MsgCode.E_0018, new object[] { SystemActionEnum.Name.IMPORT + SystemTableEnums.Name.BS_AutoPartsArchive, ex.Message }); return(false); } return(true); }
/// <summary> /// 车系值改变事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void mcbVBIS_Inspire_SelectedIndexChanged(object sender, EventArgs e) { txtVBIS_InspireSpellCode.Text = ChineseSpellCode.GetShortSpellCode(mcbVBIS_Inspire.SelectedValue); }
/// <summary> /// 【详情】配件别名失去焦点 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void txtAPN_Alias_Leave(object sender, EventArgs e) { txtAPN_AliasSpellCode.Text = ChineseSpellCode.GetShortSpellCode(txtAPN_Alias.Text.Trim()); }