Exemplo n.º 1
0
        public AddressVO GetByID(int id)
        {
            AddressVO vo = new AddressVO();
            DataTable dt = Select("ID=" + id + "");

            if (dt.Rows.Count > 0)
            {
                vo = b.ConvertObj(dt.Rows[0], new AddressVO()) as AddressVO;
            }
            return(vo);
        }
Exemplo n.º 2
0
        public AddressVO GetStateDivisionIDByName(string stateDivisionName)
        {
            AddressVO vo = new AddressVO();

            DataTable dt = SelectStateDivisionID("StateDivisionName=N'" + stateDivisionName + "'");

            if (dt.Rows.Count > 0)
            {
                vo = b.ConvertObj(dt.Rows[0], new AddressVO()) as AddressVO;
            }
            return(vo);
        }
Exemplo n.º 3
0
        //12_12_2017 (Zaw Naing)

        #region get TownshipId from Township Name
        public AddressVO GetIDByName(string townshipName)
        {
            AddressVO vo = new AddressVO();

            DataTable dt = SelectTownshipID("Township=N'" + townshipName + "'");

            if (dt.Rows.Count > 0)
            {
                vo = b.ConvertObj(dt.Rows[0], new AddressVO()) as AddressVO;
            }
            return(vo);
        }
        public int Create(AddressVO vo)
        {
            int id;

            if (!dao.isExist(vo.Id.ToString()))
            {
                id = dao.Insert(vo);
            }
            else
            {
                id = dao.Update(vo);
            }
            return(id);
        }
Exemplo n.º 5
0
        public int Insert(AddressVO vo)
        {
            int lastInsertId = 0;

            try
            {
                lastInsertId = b.Insert("Employee_Address", b.ConvertColName(vo), b.ConvertValueList(vo));
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            return(lastInsertId);
        }
Exemplo n.º 6
0
        public int Update(AddressVO vo)
        {
            int ID = 0;

            try
            {
                b.Update("Employee_Address", vo.Id.ToString(), b.ConvertColName(vo), b.ConvertValueList(vo));
                ID = vo.Id;
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            return(ID);
        }