Пример #1
0
        ///    <Description>
        ///       This method checks business rule and call AddAndReturnMaxID() method of DS class
        ///    </Description>
        ///    <Inputs>
        ///       Value object
        ///    </Inputs>
        ///    <Outputs>
        ///      N/A
        ///    </Outputs>
        ///    <Returns>
        ///      void
        ///    </Returns>
        ///    <Authors>
        ///       NgocHT
        ///    </Authors>
        ///    <History>
        ///     27-Dec-2004
        ///    </History>
        ///    <Notes>
        ///    </Notes>
        //**************************************************************************

        public int AddTableAndReturnMaxID(object pobjObjectVO, int pintGroupID)
        {
//			try
//			{
            sys_TableVO         voSysTable      = (sys_TableVO)pobjObjectVO;
            sys_TableAndGroupVO voTableAndGroup = new sys_TableAndGroupVO();
            sys_TableDS         dsSysTable      = new sys_TableDS();

            voTableAndGroup.TableGroupID = pintGroupID;
            voTableAndGroup.TableID      = voSysTable.TableID;
            voTableAndGroup.TableOrder   = dsSysTable.MaxTableOrder(pintGroupID) + 1;

            return(dsSysTable.AddTableAndReturnMaxID(pobjObjectVO, pintGroupID));
//			}
//			catch(PCSDBException ex)
//			{
//				throw ex;
//			}
//			catch (Exception ex)
//			{
//				throw ex;
//			}
        }
Пример #2
0
        ///    <Description>
        ///       This method checks business rule and call Add() method of DS class
        ///    </Description>
        ///    <Inputs>
        ///       Value object
        ///    </Inputs>
        ///    <Outputs>
        ///      N/A
        ///    </Outputs>
        ///    <Returns>
        ///      void
        ///    </Returns>
        ///    <Authors>
        ///       NgocHT
        ///    </Authors>
        ///    <History>
        ///     27-Dec-2004
        ///    </History>
        ///    <Notes>
        ///    </Notes>
        //**************************************************************************
        public void AddTable(object pobjObjectVO, int pintGroupID)
        {
            try
            {
                sys_TableVO         voSysTable      = (sys_TableVO)pobjObjectVO;
                sys_TableAndGroupVO voTableAndGroup = new sys_TableAndGroupVO();
                sys_TableDS         dsSysTable      = new sys_TableDS();

                voTableAndGroup.TableGroupID = pintGroupID;
                voTableAndGroup.TableID      = voSysTable.TableID;
                voTableAndGroup.TableOrder   = dsSysTable.MaxTableOrder(pintGroupID) + 1;

                dsSysTable.AddTable(pobjObjectVO, pintGroupID);
            }
            catch (PCSDBException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }