public PROVINCE_OBJ GetByID(PROVINCE_OBJ.BusinessObjectID id)
        {
            List <PROVINCE_OBJ> li = getAll(new spParam("CODE", SqlDbType.VarChar, id.CODE, 0));

            if (li == null || li.Count == 0)
            {
                return(null);
            }
            return(li[0]);
        }
        public int Delete(PROVINCE_OBJ.BusinessObjectID obj)
        {
            int        ret = 0;
            DBBase     db  = new DBBase(ConfigurationSettings.AppSettings["connectionString"].ToString());
            string     sql = @"DELETE FROM PROVINCE  WHERE code=@code_key
                ";
            SqlCommand com = new SqlCommand();

            com.CommandText = sql;
            com.CommandType = CommandType.Text;
            com.Parameters.Add("@code_key", SqlDbType.VarChar).Value = obj.CODE;
            ret = db.doCommand(ref com);
            return(ret);
        }