Ejemplo n.º 1
0
 protected override void btnEdit_Click(object sender, EventArgs e)
 {
     #region 编辑
     if (sGrid.CurrentRow.Index >= 0)
     {
         InventoryDAL invDAL = new InventoryDAL();
         Inventory    inv    = invDAL.DataRowToModel(dvDetail[sGrid.CurrentRow.Index].Row);
         FmInvDetail  frm    = new FmInvDetail(OpState.Browse, inv);
         frm.ShowDialog();
         if (frm.Saved == true)
         {
             string[] sArray = (string[])m_tnSelected.Tag;
             this.GetMBusiData(sArray[0], true);
         }
     }
     else
     {
         MsgBox.ShowInfoMsg("没有选择记录!");
     }
     #endregion
 }
Ejemplo n.º 2
0
        protected override void btnAdd_Click(object sender, EventArgs e)
        {
            #region 新增
            InventoryClassDAL invcDAL = new InventoryClassDAL();
            InventoryClass    invC    = invcDAL.GetModel(TreeM.SelectedNode.Name);

            FmInvDetail frm = new FmInvDetail(OpState.Add, invC);
            UICtrl.SetShowStyle(frm, 1);
            frm.ShowDialog();
            if (frm.Saved == true)
            {
                if (this.dvDetail != null)
                {
                    this.dvDetail.Dispose();
                    this.dvDetail = null;
                }
                string[] sArray = (string[])m_tnSelected.Tag;

                this.GetMBusiData(sArray[0], true);
            }
            #endregion
        }