예제 #1
0
        /// <summary>
        /// 从本地加载商品分类
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnLoadLocationCategory_Click(object sender, EventArgs e)
        {
            resetProgressBar();

            if (service != null)
            {
                Writer.writeInvoke(new MessageState {
                    Text = "从本地加载商品分类……", Color = Color.Green
                });

                Categories = service.GetLocationCategories();

                bindCategory();

                Writer.writeInvoke(new MessageState {
                    Text = "加载完成!", Color = Color.Green
                });
            }
            else
            {
                Writer.writeInvoke(new MessageState {
                    Text = "服务异常,无法从本地加载商品分类!", Color = Color.Red
                });
            }
        }