private void SetStockTip(string StockTip) { string[] TipArray = StockTip.Split(','); foreach (string Tip in TipArray) { if (Tip.Contains("北京")) { CheckBoxList_BJ.SelectedValue = Tip.Replace("北京", "") == "有货" ? "1" : "0"; } else if (Tip.Contains("广州")) { CheckBoxList_GZ.SelectedValue = Tip.Replace("广州", "") == "有货" ? "1" : "0"; } else if (Tip.Contains("呼和浩特")) { CheckBoxList_HH.SelectedValue = Tip.Replace("呼和浩特", "") == "有货" ? "1" : "0"; } else if (Tip.Contains("上海")) { CheckBoxList_SH.SelectedValue = Tip.Replace("上海", "") == "有货" ? "1" : "0"; } } }