示例#1
0
        //public long DeleteData()
        //{
        //    DalCompany dalCompany = new DalCompany();
        //    long status;
        //    status = 0;
        //    try
        //    {
        //        status = dalCompany.DeleteCompany(this);
        //        dalCompany = null;
        //    }
        //    catch (Exception ex)
        //    {
        //    }
        //    return status;
        //}
        //public void SelectData()
        //{
        //    DalCompany dalCompany = new DalCompany();
        //    ICompany iCompany;
        //    iCompany = (ICompany)dalCompany.SelectCompany(this);
        //    //_ShortName = iCompany.ShortName;
        //    //_Name = iCompany.Name;
        //    //_Address1 = iCompany.Address1;
        //    //_Address2 = iCompany.Address2;
        //    //_Address3 = iCompany.Address3;
        //    //_Active = iCompany.Active;
        //    dalCompany = null;
        //}
        public DataTable SelectAllData()
        {
            DataTable  dtbl       = new DataTable();
            DalCompany dalCompany = new DalCompany();

            dtbl       = dalCompany.SelectAllCompany(this);
            dalCompany = null;
            return(dtbl);
        }
示例#2
0
        public long DeleteData()
        {
            _UserAction = 3;
            DalCompany dalCompany = new DalCompany();
            long       status;

            status = 0;
            try
            {
                status     = dalCompany.DeleteCompany(this);
                dalCompany = null;
            }
            catch (Exception ex)
            {
            }
            return(status);
        }
示例#3
0
        //========================================================
        //Action verbs
        //========================================================
        #region Action verbs

        /// --------------------------------------------------------
        /// <summary>Loads the specified list of entites from the database</summary>
        /// <returns>True if DataTable was loaded</returns>
        public bool ListByCompanyType(int companyTypeID)
        {
            // verify (and create) data access layer
            CheckDal();

            // verify (and create) state
            CheckState();

            // type data access layer and execute data access request
            DalCompany dal = (DalCompany)_dal;

            dal.ListByCompanyType(companyTypeID, _dataTable);
            dal.Close();

            // return result
            return(_dataTable != null);
        }
示例#4
0
        public long UpdateData()
        {
            DalCompany dalCompany = new DalCompany();
            long       status;

            status = 0;
            try
            {
                _UserAction = 2;
                status      = dalCompany.UpdateCompany(this);
                dalCompany  = null;
            }
            catch (Exception ex)
            {
            }
            return(status);
        }
示例#5
0
        //========================================================
        //IBizEntity implementation
        //========================================================
        #region Implementation of IBizEntity

        public override bool CreateDal()
        {
            _dal = new DalCompany();
            return(_dal != null);
        }