Ejemplo n.º 1
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAdd_Click(object sender, EventArgs e)
        {
            FrmStoreInfo fStore = new FrmStoreInfo();

            fStore.Tag = new FInfoModel()
            {
                ActType = 1,
                UName   = uName,
                FId     = 0
            };
            fStore.ReLoadHandler += LoadStoreList;
            fStore.ShowDialog();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 显示仓库信息页面(新增、修改、详情)
        /// </summary>
        /// <param name="actType">1  add  2 edit  4 info</param>
        /// <param name="unitId"></param>
        private void ShowStoreInfoPage(int actType, int storeId)
        {
            //acttype  id   uname    (reload刷新列表数据)
            //另一种刷新:利用事件   为信息页面定义一个事件
            FrmStoreInfo fStoreInfo = new FrmStoreInfo();

            fStoreInfo.Tag = new FInfoModel()
            {
                ActType = actType,
                FId     = storeId,
                UName   = uName
            };
            if (actType != 4)
            {
                fStoreInfo.ReLoadHandler += LoadStoreList;//订阅  并不是每种都需要刷新
            }
            fStoreInfo.ShowDialog();
        }