示例#1
0
        public 基础物品信息设置界面(int?goodsID, bool isSave)
        {
            InitializeComponent();

            m_goodsID = goodsID;

            if (goodsID == null)
            {
                MessageDialog.ShowPromptMessage("【物品信息】异常,请退出当前界面,再试");
                this.Close();
            }
            else
            {
                lbStock.Text = m_serverStock.GetGoodsStock((int)goodsID).ToString();
                m_goodsInfo  = m_serverGoods.GetGoodsInfo((int)goodsID);
                m_lstRecord  = m_serverGoods.GetGoodsAttirbuteRecordList((int)m_goodsID);
            }

            StapleInfo.InitUnitComboBox(cmbUnit);

            dataGridViewBlankToProduct.DataSource = new BindingList <View_F_GoodsBlankToProduct>(m_lstBlankToProductInfo);
            dataGridViewReplace.DataSource        = new BindingList <View_F_GoodsReplaceInfo>(m_lstReplaceInfo);
            dataGridViewWaterCode.DataSource      = new BindingList <F_ProductWaterCode>(m_lstWaterCode);

            ShowInfo(m_goodsInfo, m_lstRecord);

            if (isSave)
            {
                ShowRightControl();
            }
            else
            {
                btnSave.Visible = isSave;
            }
        }