Biz.BizProduct

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using Test.Dal;

namespace Test.Biz

{

    class BizProduct

    {

        string proID;

        public string ProID

        {

            get { return proID; }

            set { proID = value; }

        }

        string proCode;

        public string ProCode

        {

            get { return proCode; }

            set { proCode = value; }

        }

        string proName;

        public string ProName

        {

            get { return proName; }

            set { proName = value; }

        }

        string proLine;

        public string ProLine

        {

            get { return proLine; }

            set { proLine = value; }

        }

        public BizProduct(string _proID, string _proCode, string _proName, string _proLine)

        {

            proID = _proID;

            proCode = _proCode;

            proName = _proName;

            proLine = _proLine;

        }

        public BizProduct()

        {

        }

        internal List<BizProduct> GetAll()

        {

            return DalOracle.GetALL();

        }

        internal string Add()

        {

            try

            {

                if (this.proID == "-1")

                {

                    proID = DalOracle.Add(this);

                    return proID;

                }

                else

                {

                    return DalOracle.Update(this);

                }

            }

            catch (Exception ex)

            {

                throw ex;

            }

        }

    }

}

Bạn đang đọc truyện trên: TruyenTop.Vip

Tags: